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

Categories

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

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

1 Answer

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/)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...