dimanche 1 mars 2015

Posting to a facebook's page wall with standalone python application

I am going to post message to my facebook's page with a standalone python application. Please notice that it is not a we application - just a script deployed and working on my local machine.


I read the facebook's documentation and I know that I need to create a facebook's app which I will be connecting to and which will send requests on the behalf of my 'real' python application. I discovered that I needed to create a facebook app as a 'Website app' and I did it. I discovered than with a switch "Settings->Advanced->Native or desktop app?" set as 'No' I am able to get my access token with the url:


http://ift.tt/1ALksrK


Now I am almost there. I can get information of my facebook user and my facebook page. But I can not post anything to user's wall neither page's wall because I got the error:



(#200) The user hasn't authorized the application to perform this action



I read that I may use the following URL to grant manage_pages privileges to my app:


http://ift.tt/1wFjuYR


but I do not know what to put in REDIRECT_URL as in fact my real standalone app has no url at all. I tried to put some facebook's addresses there but it does not seem to be a good idea.


What I am doing wrong? I suppose I need to switch "Settings->Advanced->Native or desktop app?" to Yes but then I am not able to get access token... Should I get this token in some other way?


Best regards


Aucun commentaire:

Enregistrer un commentaire