ios - Get publish_actions permission with facebook -


i using below code using share post facebook.

if ([[fbsdkaccesstoken currentaccesstoken] hasgranted:@"publish_actions"]) { [[[fbsdkgraphrequest alloc] initwithgraphpath:@"me/feed"                  parameters: @{ @"message" : @"hello world"}            httpmethod:@"post"] startwithcompletionhandler:^(fbsdkgraphrequestconnection *connection, id result, nserror *error) { if (!error) {   nslog(@"post id:%@", result[@"id"]); } }]; } 

if want post status update, requires publish_actions permissions. did't permission how can , adding permission.

please me....

the access token holds "scope" information indicates permissions allowed specific user.

in order publish_actions app, need apply review facebook submitting additional permissions need. once approved able appropriate access tokens.

you can access token sending request facebook this:

https://www.facebook.com/dialog/oauth/access_token?   client_id={app-id}   &redirect_uri={redirect-uri}   &scope={scope-params} 

client-id: each app created in facebook has such client-id. can see in dashboard under facebook-developers. (of course, means have create such app in facebook)

in scope have name permissions want use (comma-separated). can find overview here: https://developers.facebook.com/docs/facebook-login/permissions

note access_token has expiration set. may outdated @ time.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -