How to post message with message_tags field using Graph API in PHP

后端 未结 2 499
后悔当初
后悔当初 2020-12-31 18:15

I want to post message with message_tags using Graph API.

I confirmed message only post in PHP, but don\'t work with message_tags..

This is sample code.

相关标签:
2条回答
  • 2020-12-31 18:54

    Apparently the message_tags can only be read via the API. Writing message_tags is not supported. See this bug report and facebook response from 11/22/2011.

    0 讨论(0)
  • 2020-12-31 18:55

    add this line of code to auto-post your message to wall

    if ($user) {
        $attachment =  array(
            //'access_token' => $access_token,
            'message' => "Amazing stuff by I just took part in their  by dragging and dropping items I would like to win, and who knows, I could get lucky!",
            'name' => "",
            'link' => "http://www.facebook.com/abc?sk=app_111111111111",
            'description' => "Pick your  and you could actually win all the items that you pick!",
            'picture'=> "http://www.abc.in/img/dp.png"
            );
        //var_dump($attachment);
        $facebook->api('/me/feed', 'POST', $attachment);
    }
    
    0 讨论(0)
提交回复
热议问题