Skip to main content

How do you post to the wall on a facebook page (not profile)


I have a blog site written in php and it posts new blog posts to twitter and a blog ping automatically under the hood using simple http post requests passed using php curl.



I have a facebook page for the blog site and want the updates to be posted to the wall on the page, is there a simple way to do this?



What I really want is a url and set of params to parcel up as an http post request.



Note that this is to post to the wall on a new style page not a profile.



Thanks in advance.


Source: Tips4allCCNA FINAL EXAM

Comments

  1. <?php
    $attachment = array(
    'message' => 'this is my message',
    'name' => 'This is my demo Facebook application!',
    'caption' => "Caption of the Post",
    'link' => 'http://mylink.com',
    'description' => 'this is a description',
    'picture' => 'http://mysite.com/pic.gif',
    'actions' => array(
    array(
    'name' => 'Get Search',
    'link' => 'http://www.google.com'
    )
    )
    );


    $result = $facebook->api('/me/feed/', 'post', $attachment);


    the above code will Post the message on to your wall... and if you want to post onto your friends or others wall then replace me with the Facebook User Id of that user..for further information look out the API Documentation.

    ReplyDelete
  2. Harish has the answer here - except you need to request manage_pages permission when authenticating and then using the page-id instead of me when posting....

    $result = $facebook->api('page-id/feed/','post',$attachment);

    ReplyDelete
  3. You can not post to Facebook walls automatically without creating an application and using the templated feed publisher as Frank pointed out.

    The only thing you can do is use the 'share' widgets that they provide, which require user interaction.

    ReplyDelete
  4. This work to me:

    try {
    $statusUpdate = $facebook->api('/me/feed', 'post',
    array('name'=>'My APP on Facebook','message'=> 'I am here working',
    'privacy'=> array('value'=>'CUSTOM','friends'=>'SELF'),
    'description'=>'testing my description',
    'picture'=>'https://fbcdn-photos-a.akamaihd.net/mypicture.gif',
    'caption'=>'apps.facebook.com/myapp','link'=>'http://apps.facebook.com/myapp'));
    } catch (FacebookApiException $e) {
    d($e);
    }

    ReplyDelete
  5. If you're blog outputs an rss feed you can use Facebook's "RSS Graffiti" application to post that feed to your wall in FB. There are other RSS facebook apps as well just search facebook for rss apps...

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

CCNA 1 Final Exam 2011 latest (hot hot hot)

  Hi! I have been posted content of ccna1 final exam (latest and only question.) I will post the answer and insert image on sunday. If you care, please subscribe your email an become a first person have full test content. Subcribe now  Some question  have not content because this question have images content. So that can you wait for me? SUNDAY 1. A user sees the command prompt: Router(config-if)# . What task can be performed at this mode? Reload the device. Perform basic tests. Configure individual interfaces. Configure individual terminal lines. 2. Refer to the exhibit. Host A attempts to establish a TCP/IP session with host C. During this attempt, a frame was captured with the source MAC address 0050.7320.D632 and the destination MAC address 0030.8517.44C4. The packet inside the captured frame has an IP source address 192.168.7.5, and the destination IP address is 192.168.219.24. At which point in the network was this packet captured? leaving host A leaving ATL leaving...