Facebook Exception #100 : Does not resolve to a valid user ID
While trying to post to a user's facebook wall using PHP, I am getting the error
{
"error": {
"type": "OAuthException"开发者_JAVA技巧,
"message":"(#100) http:\/\/spats.in\/nssc2 does not resolve to a valid user ID"
}
}
This is my code :
$apprequest_url = "https://graph.facebook.com/feed";
$mymessage="Hello World!";
$parameters = "?" . $access_token . "&message=" . urlencode($mymessage) . &id=".urlencode('http://spats.in/nssc2')."&method=post";
$myurl = $apprequest_url . $parameters;
$result = file_get_contents($myurl);
What is the problem?
One reason for getting the (#100) <url> does not resolve to a valid user ID
error is that the page has its Open Graph meta tags set incorrectly. You can use Facebook's Open Graph Debugger to see what might be wrong.
I figured it out myself. The request URL should have been http://graph.facebook.com/me/feeds/ and no id parameter was required.
精彩评论