简体   繁体   中英

Can a page tab post to a user's wall?

I have a Facebook application used as a tab in a fan page, that displays different information depending on whether tha user is a fan of that page or not.

Now I've been asked to have it post a message to a user's wall if they perform certain action (follow a link or whatever), and so far I haven't found a way to do that. All the documentation I have found refers to stand alone apps, and I've even seen it suggested (in the FB forums) that you can't get the auth token from an app.

So, i still think it can be done, but how?

If a user has authorized your app, you can post to her wall using the PHP SDK. See the PHP SDK api documentation for examples.

All apps have to be iframe apps now, so loading the JS sdk should be fine.

You have to get permissions first ->

http://developers.facebook.com/docs/authentication/#applogin

Then you can post using php with what Dhiren said, or, post with the fb.api function with JS -> http://developers.facebook.com/docs/reference/javascript/FB.api/

Let me know if you need an example script.

Cheers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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