android - Posting on facebook wall using Request -


all day i'm trying figure how post on facebook wall of own account using own program. followed tutorials on facebook developer pages, didn't helped. have request code:

        bundle params = new bundle();params.putstring("app", "http://samples.ogp.me/##############");  //      list<string> permissions = new arraylist<string>(); //      permissions.add("publish_actions"); //      session.getactivesession().requestnewpublishpermissions(new newpermissionsrequest(getmainactivity(), permissions));         request request = new request(             session.getactivesession(),             "me/appnamespace:test",             params,             httpmethod.post         );         response response = request.executeandwait();         log.print("response: " + response.tostring()); 

all produce following error:

response: {response:  responsecode: 200, graphobject: null, error: {httpstatus: -1, errorcode: -1, errortype: null, errormessage: null}, isfromcache:false} 

this gives next none information of wrong. 200 error code seems have permissions.

i found on this page text:

error:

{ "error": { "message": "(#200) requires extended permission: publish_actions", "type": "oauthexception", "code": 200 } }

reason:

you haven't authorized app publish timeline. click on ''get access token'' , click ''extended permissions'' tab. select publish_actions permission , run test again.

for reason can't add publish_actions extended permissions in graph api explorer, because there no option that! publish_streams. add that. error there:

{   "error": {     "message": "(#10) application not have permission action",     "type": "oauthexception",     "code": 10   } } 

in application permissions page on facebook have added publish_actions on user & friend permissions , publish_stream on extended permissions (i unable add publish_actions there).

in end, no matter can't message posted in facebook timeline unless use webdialog, isn't need.

i'm out of options on might wrong. ideas appreciated.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -