Error 100 When Attempting to post from app to Facebook wall?

Posted by IMAPC on Stack Overflow See other posts from Stack Overflow or by IMAPC
Published on 2012-06-28T20:59:25Z Indexed on 2012/06/28 21:16 UTC
Read the original article Hit count: 231

Filed under:
|
|
|
|

I'm playing around with the Facebook API, and have gotten far enough to get the access token into my app, but when I go to actually send a post to my Facebook wall I get the error message, {"error":{"message":"(#100) You can't post this because it has a blocked link.","type":"OAuthException","code":100}}1 I'm not attempting to send any kind of link, just "Hello, World!" so this seems pretty weird to me :\ Here's my code so far:

$content = urlencode("Hello, World!");
$accesstoken = urlencode($row['fbid']);    
$result = getPageWithPOST("https://graph.facebook.com/me/feed", "access_token=" . $accesstoken . "&message=" . $content);
echo $result;

where getPageWithPOST is,

function getPageWithPOST($url, $posts) {
    $c = curl_init();
    curl_setopt($c, CURLOPT_URL, $url);
    curl_setopt($c, CURLOPT_POST, true);
    curl_setopt($c, CURLOPT_POSTFIELDS, $posts);
    $content = curl_exec ($c);
    curl_close ($c);
    return $content; 
}

thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook