What is the call back url I should provide for spree social - twitter-oauth

I am using spree_social gem, for social media logins using facebook and google.
How ever while I am trying to create an app in twitter, they say call back url is invalid
http://localhost:3000/users/auth/twitter This is what I am giving as the call back url. What should I give the call back url to make it work

As it's mentioned in spree_social extension the callback url for
Twitter, http://localhost:3000 (development) or http://your-site.com (production) (mentioned here).
Facebook, no callback url required (see here).
Google, http://localhost:3000/users/auth/google_oauth2/callback (development) or http://your-site.com/users/auth/google_oauth2/callback (production).

Related

Callback Url for twitter developer (tweepy)

I am making an real time NLP model, for which I'm trying to stream data from twitter using tweepy. I'm new to APIs and the twitter developer authentication is asking for call_back url and website url. Now, I don't have a website, I just need data which I'll save in a dataframe. What URL should I give for callback and website?
If you are going to use an App-Only OAuth 2.0 authentication (or only the tokens of your dev account), you don't need a callback URL since this is supposed to be the URL where your users would have been redirected after having authorizing your application in a Twitter page.
If the field is mandatory in the form, just input localhost (this is standard for dev env anyway).

How to get facebook code from redirect uri in Java desktop application

im a newbie in graph facebook api. I try to get MY_VERIFICATION_CODE by send http request:
link1: https://facebook.com/dialog/oauth?client_id=APP_ID&redirect_uri=https://www.facebook.com/connect/login_success.html
and then Facebook will redirect to http://www.facebook.com/connect/login_success.html? code=MY_VERIFICATION_CODE
but I cant get code from response. I copy link1 to chrome, it redirects to url with a code appended as parameter, but this url stays just for seconds and then it changes to this: https://www.facebook.com/connect/blank.html#=
My question is how to read the code from the redirected uri in a java desktop application?
It's all described in the docs at
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.3#login
Quote:
When using a desktop app and logging in, Facebook redirects people to the redirect_uri mentioned above and places an access token along with some other metadata (such as token expiry time) in the URI fragment:
https://www.facebook.com/connect/login_success.html#access_token=ACCESS_TOKEN...
Your app needs to detect this redirect and then read the access token out of the URI using the mechanisms provided by the OS and development framework you are using. You can then skip straight to the Inspecting access tokens step.

Spotify App - Facebook Auth logout procedure

In the Spotify App's API docs there is a module to authenticate via Facebook - now I try to find a way to logout from Facebook but can't find any documentation about the correct procedure. The Facebook Javascript SDK provides a logout method via FB.logout() for this - how about the Spotify API?!
In order to log out, you need to make a GET request to the Facebook's logout URL, which at the moment is https://www.facebook.com/logout.php, passing two parameters:
access_token: It is the access token provided by Facebook when access to the user's account was requested.
next: It is a URL that has to be part of the domain URL that was set on Facebook's app profile.
Logging out is performed by making an AJAX call to that URL. If it was successful, a redirection to the next URL will me made. Otherwise, the redirection will be made to http://www.facebook.com/home.php (for instance, if the next URL doesn't belong to the registered app domain).
You can read the response of that AJAX call and check that the content you get is that from your next URL.
You need to use the Facebook API - if you look at the documentation, you'll see that auth.authenticateWithFacebook is just a thin wrapper around auth.showAuthenticationDialog. It doesn't actually interact with Facebook's "proper" API at all - it only loads Facebook's login page and gives you a callback when the user is logged in.

Invalid URL error message for integrating FB Apps into website with user using static IP

I'm living in Vietnam now. As I known and tested, FB is blocked now. Therefore I have to use static IP for facebook (60.254.175.42). Using this method, I can log into Facebook from WEB browser without any problem. But when I use OAuth protocol to integrate FB into my website (ex. allows user use FB account to log into my website), I always receive the message 'The requested URL "/oauth/authorize?client_id=152190004803645&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8888%2Ffb&scope=publish_stream,email,user_birthday,user_location", is invalid.
Reference #9.26affe3c.1328519733.956d48'.
Please advice,
Thanks
Ensure that you using full URL and no just part of it before redirecting user, full URL should look like this:
http://www.facebook.com/dialog/oauth/authorize?client_id=152190004803645&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8888%2Ffb&scope=publish_stream,email,user_birthday,user_location
Also check that you defined localhost as App Domain in your application settings.

Facebook callback URL

I am a little confused with the Facebook call back URL. I am building a iPhone application with Facebook login. So I will receive the access token from Facebook after the user logged in. Then I save this access token to my local (server side) DB. After that I want to use this access token to sent for example a post via C#.
What should I define for the callback URL? What is the importance of this?
The callback url is used to provide fast app switching, that is, the user of your app is first redirect to facebook app or site to do the login, then it invokes the url you did define and, if properly configured, it will be redirected to your app again.
You can specify the callback url from developers section on facebook, then you have to support it in the your app plist.