learningtech
learningtech

Reputation: 33685

How to make facebook posts public via API call

I downloaded the facebook sdk for php. I created a php script to post a message to my facebook wall. The problem is that the post is "private" and only seen by me. How do I make it public for every one to see? Here's the line of code executing the post:

$facebook->api("/me/feed", "post", array(
    message => $_REQUEST['msg'] ? $_REQUEST['msg'] : 'Forgot to check for msg',
    picture => "http://cdn.papyimg.com/wp-content/uploads/2011/03/Windows-95-500x312.png",
    link => "http://en.wikipedia.org/wiki/Windows_95",
    name => "Go windows 95",
    caption => "Caption - this is the best operating system in the world!",
    privacy => array('value'=>'EVERYONE'),
));

I have an argument for privacy based on my understanding of the documentation in the API. But it doesn't alter the privacy state of my post.

What am I doing wrong?

Upvotes: 0

Views: 2752

Answers (1)

Gil Birman
Gil Birman

Reputation: 35900

Go to your facebook profile settings and click apps. Find your app in the list and delete it. Now go to your app again. When you are asked to authorize the app, make sure to choose the public scope for posts made by your app. If you want you can also edit the settings for your app (at developers.facebook.com) and make public the default option, look in the Auth Dialog section.

Upvotes: 2

Related Questions