How to process applications for participation in Facebook?

I am working on a Facebook application. I suggest the user invite his friend to the application using the C # SDK. as shown in the Facebook documentation

My problem is that the friend of the user receives the application request and clicks Accept , it does not show application permission request page .

Do I need to pre-prepare an additional step to redirect the user to the application permission request page ?

+7
source share
6 answers

i found a solution

I begin to request permission on the application’s canvas page and, if the user accepts, redirects the query string to the same page. not perfect solution but it works great

+2
source

If you use http://facebooksdk.codeplex.com/ with MVC3 on the main application controller, you must provide redirection for unauthorized users:

 var fbWebContext = FacebookWebContext.Current; if (fbWebContext.IsAuthorized() && fbWebContext.UserId > 0) { try { var fb = new FacebookWebClient(fbWebContext); dynamic result = fb.Get("/me"); } catch (FacebookOAuthException) { var redirectString = string.Format("https://graph.facebook.com/oauth/authorize?client_id={0}&redirect_uri={1}&type=user_agent&display=page&scope={2}", Facebook.FacebookApplication.Current.AppId, FacebookWebContext.Current.Settings.CanvasPage, "email, publish_actions" ); Response.Redirect("redirectString"); } } 
+1
source

You need to ask the user for permission, as shown at http://developers.facebook.com/docs/reference/dialogs/oauth/ . How did you get the permissions of the first user to invite a friend? You can redirect it to this page or the page to which clicks are processed with application requests that can check permissions to use the application. If the user has not granted permission, you can easily ask him about them.

You should always check permissions, because even a user who is already using your application can revoke them.

0
source

By default, receiving a Facebook application request redirects the user to the application’s main page. If your application requires Facebook permissions to view the homepage, you should verify that all visitors accepted your permissions and redirected them to the OAuth permissions dialog if they did not. Please note that the documentation on Facebook suggests removing the accepted request after the user visits your application using the request_ids parameter, which is sent in the request line.

0
source

What do you mean by application permission request page ? Is this the one where the user allows a third-party application to access their data on facebook?

I agree with another answer. After the user clicks the application request notification icon from his facebook account, he is redirected to the application’s canvas page, the request includes a list of request_ids generated by your application.

In your application, after reading facebook request_ids, you can ask facebook about the received request_id, and then decide what to do with this information, you can pass an additional data parameter to provide additional information about how the application request was created.

Finally, you can redirect the user to any page you want based on the information you received.

Hope this helps

0
source

you should check if the user is suitable for your application from the request ... if the request_ids parameter is present. If so, you should redirect the user to the page where permissions will be requested, and a list of outstanding queries!

0
source

All Articles