I am planning to do this simple thing: creat开发者_StackOverflow中文版e a button "Share on FacebooK" that open the Facebook login page and after the login there is a default message (to promote my App) that will be shared by my App on Facebook.
That sound stupid i know, but i only see examples with the user who can write a message and then share it on facebook, i don't want the user to interact, i just want the user share my App message on his facebook profile.
all i want is my App do something like this:
JACK WHITE "THISApp is the new app that bla bla bla etc etc bla bla bla etc etcbla bla bla etc etcbla bla bla etc etc the link is http/acme"
[THISApp icon] Today at 1pm via My Application Name
Thanks!
Well once you implement facebook connect , the user will be prompted to provide permissions for your app. You need to explicitly provide what permissions you need from the user. In your case post to wall. If the user allows your app, you will get a auth token which you can use in the background to post any message on to the users wall. This is fairly simple and doesn't need user interaction.
I assume you know how to get the authtoken other wise you can check the facebook book graph API integration tutorial by ray wenderlich. Developer.facebook.com has got the list of permissions and sample SDK hosted on github.
Try using MOFBHelper. Easy to use with minimal code.
This will set the user's status without the user having to type anything out. Hope that helps.
精彩评论