Suggest Page to friends using PHP-SDK

后端 未结 2 791
执笔经年
执笔经年 2020-12-12 07:38

How to implement \"Suggest MY-PAGE to friends\" using PHP-SDK or using Javascript SDK?

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 08:30

    First you need the Facebook SDK bundle that contains base_facebook.php, facebook.php and fb_ca_chain_bundle.crt . You will also need fbmain.php and config.php .

    Next you should have a file (e.g postToWall.php) that includes fbmain.php

    
    

    An example of postToWall.php file.

    
        
        
    "message here", 'picture' => "picture hyperlink here", 'name' => "name here", 'link' => "facebook page hyperlink here", 'description' => " description here" ); $status = $facebook->api('/me/feed', 'POST', $params); if (isset($status['id'])) { //do something } } ?>

    Credits to my tutor, Mr Zen Leow

提交回复
热议问题