简体   繁体   中英

Place facebook login link

Using symfony2.1 and FosFacebookBundle.

I want to place a link on my homepage to login in facebook.

In my template:

<a href="https://www.facebook.com/dialog/oauth?client_id=APP_ID&redirect_uri=
           http://dev.example.com/auth/login&scope=email,read_stream" target="_self">
  test link login facebook</a>

If I click test link login facebook then I am still on my dev.example.com/login?code=AQBgyy9u2qm... site. When I copy the https://... link and put it in the address bar manual, everything works. How can I place it on my homepage, that the target is self, open up facebook, login and redirect to my homepage.

Let me get this straight, you are trying to test the oauth authentication dialog, and when you click the link, you are sent directly to your redirect_uri with a code parameter in the url?

I have some good news for you -- Facebook didn't bother showing the "Authorize this app?" page to you, since you have already authenticated the app.

To revoke those permissions, you'll have to enter your account's privacy settings, and revoke permissions to your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM