Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

objective c - Can we invite people to use our app or send friend request from the app via Facebook in iOS 5?

Consider X and Y are friends in Facebook and they both have installed an app in their respective phones. But they are not friends with each other in that app's friend list. So now, can X send a friend request to Y from the app itself, so that they could be friends on the app's friends list?

Also in another case, X has installed this app in his phone, while Y has not. So again, can X invite Y to use that app?

It tracks the people through the email id they have registered with in Facebook. So, find friends is for searching the "already app users", who are not in the app's friend list, but are friends in facebook and invite friends is for inviting the non-users of the app who are friends in Facebook.

My question is, is this possible in iOS5 ie. without using the Facebook sdk which was introduced only in iOS6?

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

Use Facebook-sdk 3.1

User-generated requests are initiated when the app enables the user to select one or more friends to send a request to.

We will walk you through the steps to send out an invite or a request:

  • Triggering when the invitation or request is sent
  • Sending the request
  • Sending additional data with the request, such as a virtual gift

You can set up your app to prompt the user to send out an invite after the user has used the app a certain number of times. You should also give the user the ability to invite friends to use the app at any time through the use of a menu button they can always get to. In this step we will show you a simple way of triggering the invitation request.

See https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/#protip2 for different types of coding logic.

See also:

  1. How to send add friend request (to facebook user) from iOS application?
  2. Can a facebook friend request be sent from my own app?

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...