can't login with twitter using django-social-auth - twitter-oauth

I'm using django-social-auth app (https://github.com/omab/django-social-auth) for social authentication.
I provided the consumer_key and consumer_secret to the app.
when I write the link that logins to twitter
http://127.0.0.1:8000/accounts/login/twitter, the page loads, as if there's a request being sent, for some seconds, then page stops loading without any redirecting or any other reaction

You need to specify the Callback URL in your Twitter app settings to point to localhost.
Go to your Twitter app settings:
https://dev.twitter.com/apps
Choose your app and click on the Settings tab. In the Callback URL field type:
http://127.0.0.1:8000
Once you deploy your app on the web you'll need to return to this screen and update the Callback URL to point to your app's domain.

Related

Facebook iPhone web app Authentication not working

i have made a web app for the iPhone that connects to facebook using oAuth.
When i try this on my computer everything works fine: i can click login on my page, it redirects to a authentication page of Facebook, i click OK, redirects back to my page and i'm logged in.
When i do the same thing on my iPhone: i tap login on my site, it redirects to the facebook auth page. But THEN it changes to a mobile page and that page is just blanc. There is nothing on it and the 'title' is "UNTITLED"...
How can i fix this ? (or is this a bug at Facebook ?)
Thanks
Evert
In the Facebook Developer page for your app, have you enabled "Native iOS App" checkmark
and the fields in that section.
Like you have to specify the bundle id of your app, you have to enable Facebook login radio button and also you have to enter the url scheme of your app in the Url Scheme suffix field.
Standard is to prefix fb to your fb app id and use it as the url scheme.
Also make sure you enter this urlscheme in the Xcode project in the info.plist file
under URL types . This will be used to redirect to your app once the authentication is successful/failed.

Callback url not working while integrating Twitter with iOS

I am using mgtwitterengine to implement twitter login on my ios app. I'm having trouble logging in to my application using this library.
After giving my twitter username/password, I am redirected to the landing page of my website (on Twitter development settings, I have given a callback url to http://mywebsite.com and I am redirected to mywebsite.com after giving my username/password and signing in). How do I get it to redirect to my application's home page?
I was facing the same issue before.Removing the callback url from the development settings will automatically redirect to your application's home page.Hope this helps you.
Callback URL is not going to be used by your iOS or Android app. So, it doesn't matter what you enter here, as long as it's a valid URL such as [ https://pratik.com ] or [ http://myAppName.com ]

How to redirect your "Go to app" button to lead users to your website

i set up a new app-- when my users recieve the permission scree, after clicking "Go to app" i want it to redirect to my own website (ex.www.mysite.com) instead its redirecting me to my website within facebook.
Since my website is not compatible within facebook, i need the app to lead users to my site- how can i do that?
The url that the users are being redirected to once the clicked the allow button is the url you provided in the "redirect_uri" parameter when you sent the user to the oauth dialog.
Instead of specifing your fb app url (apps.facebook.com/APP_NAME) you can use ex.www.mysite.com (as long as it's the same as what's in the app settings).
Another thing that you can do is to just reload the page using javascript:
top.location.href = "ex.www.mysite.com";
With all of that said, you should not be doing that.
It cleary says in the Facebook Platform Policies:
The primary purpose of your Canvas or Page Tab app on Facebook must not be to simply redirect users out of the Facebook experience
and onto an external site.
If your app has a Canvas presence, then the Go To App button will redirect to your canvas landing page. For example http://apps.facebook.com/yourapp
If your app is strictly a Connect app then the Go To App button will redirect to your site outside of Facebook for example http://www.yourapp.com
If your app has both Canvas and Connect implemented, it will go to the Canvas page.
The relevant settings in the Facebook developer app are under "Select how your app integrates with Facebook". You do not need to have any canvas presence within Facebook.com. You can just check the box for Website and then the Go To App button will take users directly to your site. Be aware that if you do this you lose the ability to use a few important API features such as Bookmarks and Requests.

Cannot see authorize dialog when user wants to install my app

i have created an facebook application
when trying to access the application for the first time
i don't see the dialog asking to authorize the application
i only see a facebook logo ,
only when pressing the link under the logo i can see the auth dialog
what i am doing is to redirect the client to this URL
https://www.facebook.com/dialog/oauth?client_id=my client number&redirect_uri=http%3A%2F%2Fmy-side-domain.com%3A9000%2F&scope=read_stream,user_birthday,user_location
can u tell me what i am missing
(it redirect ok under chrome , but not on firefox)
thank you
Is this a canvas app on facebook.com? What you are describing sound like what happens when you do a redirect to the oauth dialog in a canvas app within the canvas iframe. You need to bust out of the iframe during the redirect:
Because of the way that we currently load iframes for Apps on
Facebook.com, it is important that you navigate the top window of the
user's browser to the OAuth Dialog. Many apps do this by sending a
script fragment to the user's browser setting the top.location.href
property to the dialog URL.
source: http://developers.facebook.com/docs/appsonfacebook/tutorial/#auth

How to become redirected to Facebook's Mobile Web URL

I would like to integrate an existing, external application with Facebook using Mobile Web method and its authenticated referrals as well as to be able to redirect user (incoming from a different place) to Facebook login page. I do not want it to be embedded in Facebook page.
If I understand correctly how the authenticated referrals work, I must somehow reach the authentication dialog which will redirect me to the Mobile Web URL, which I specified in the application configuration.
Additional information: I would like to avoid making the application public until it is ready, so I have set the Sandbox Mode setting to Enabled.
How to get the URL, with which I will be able to test authenticated referrals?
You can land at your game's Mobile Web URL page using following steps:
Switch your user agent to iPhone or other mobile.
Go to the http://m.facebook.com page.
Press the "identity" icon in the top left edge of the screen to show the bookmarks menu.
Look for the application in the Apps section.
Press the application bookmark.
Above procedure worked for me. My user was an admin of the project but it will probably work also for devs and testers (just a guess).