Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
335 views
in Technique[技术] by (71.8m points)

iphone - Facebook API: Post on friend wall

Is it possible to post something on a users friends wall, without having to get all the friends first (So you can get the friend id)?

[facebook requestWithGraphPath:@"me/friends" andDelegate:self];  
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can get the friends of the logged in user by issuing a request to me/friends.
Then you can create a ui element that shows the list of friends and the user can select the ones he want to share with.

Then, after the user selected you simply post on their walls by issuing a POST to FRIEND_ID/feed (Feed connection of the User object).
You'll need to have the publish_stream permissions which lets you: Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends (http://developers.facebook.com/docs/authentication/permissions/)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...