Facebook: Can't publish on user feed in test mode -


i have developed facebook app in test mod , want publish on test user's wall.

this link user register , accept permissions:

https://www.facebook.com/dialog/oauth?type=user_agent&client_id=my_app_id&display=popup&redirect_uri=the_url&scope=email%2cpublish_actions

after getting sort of token, using token doing following request graph:

/oauth/access_token?client_id=my_app_id&client_secret=my_app_secret&grant_type=fb_exchange_token&fb_exchange_token=".$token

the token coming being used me user's details graph:

/me/?$user_access_token&fields=name,age_range,id,email,gender,currency,locale,timezone"

i getting in result fields listed above. (one strange thing, id coming not test user's public id, other field correct...)

when want post someones wall running int graph:

/oauth/access_token?client_id=my_app_id&client_secret=my_secret&grant_type=client_credentials

the token coming used here:

    $token = self::getaccesstoken($app_id,$app_secret);      $post_array = array();     $post_array['access_token'] = $token;     $post_array['message'] = urlencode($message);     $post_array['link'] = urlencode($link);     $res = self::post("https://graph.facebook.com/".$user_id."/feed?",$post_array);// user id might wrong? 

and getting following error: {"error":{"message":"(#200) permissions error","type":"oauthexception","code":200,"fbtrace_id":"eo5wvmfyygc"}}

what can be? fact in test mod? or maybe user's id got wrong?

thanks

the id correct, "app scoped id". not supposed use global/public id anymore, , should use /me/feed posting, not /user-id/feed. can post on wall of authorized user anyway.


Comments