简体   繁体   English

如何使用本地服务器上的PHP API在Facebook墙上发布消息?

[英]How to post message on Facebook wall with PHP API from local server?

How do I post a message on my Facebook wall with PHP API from a local server? 如何使用本地服务器上的PHP API在Facebook墙上发布消息?
I use local PHP server Apache. 我使用本地PHP服务器Apache。

Please, give me an example! 拜托,举个例子吧!

You call the /me/feed connection and the proper parameters called in the docs 您调用/me/feed连接以及文档中调用的正确参数

$parameters = array('message' => 'Test message');

$facebook->api('/me/feed/','post', $parameters);

Thats possible of course. 那当然可能。 Where you run your PHP is unimportant. 运行PHP的地方并不重要。 You need just an accesstoken for your profile to do so. 您只需要为您的个人资料提供访问权限即可。 Maybe you have to set the url of the facebook application in the developer center to your localhost url. 也许你必须将开发人员中心的facebook应用程序的url设置为localhost url。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM