php - post message on facebook wall not working -
i want post message on facebook wall our site. first getting error
uncaught oauthexception: (#200), when trying post on wall
now not getting error code not working.
$facebook = new facebook(array( 'appid' => app_id, 'secret' => app_secret, 'cookie' => true, 'req_perms' => 'email,read_stream,read_friendlists,publish_stream,offline_access,manage_pages', )); $user = $facebook->getuser(); $token = $facebook->getaccesstoken(); if ($user) { seek { $user_profile = $facebook->api('/me'); } grab (facebookapiexception $e) { error_log($e); $user = null; } } if (!empty($user_profile )) { $username = $user_profile['name']; $uid = $user_profile['id']; seek { $post=$facebook->api("/".$uid."/feed", "post", array( 'access_token' => $token, 'message' => 'test', )); } grab (facebookapiexception $e) { error_log($e); $user = null; } }
but no message coming do? there problem while creating application?
here's wild guess, since our comment q&a wasn't going work well.
if authorize app set of permissions, , subsequently alter permissions app requests (at app admin page), existing authorization not update include new permissions. app still function, actions require new permissions fail.
you can test if causing error removing app personal business relationship app settings page, , re-approving app new permissions. if problem vanishes, congratulations. if not, you'll need more detective work. code appears fine.
php facebook-graph-api
No comments:
Post a Comment