Yii facebook login issue - facebook

I have created an facebook application in Yii and make user(s) login to my application using their facebook credentials .I'm using OAuth for facebook authentication and it's works fine on local server but doesn't work on php AppFog server. Link to my application is http://nettantra-cvbuilder.aws.af.cm/ .
Can any body tell what will be the problem .

This is probably because the URLs in your Facebook App are incorrect. You need to replace those with the final ones in the App settings (at least 'Site URL' in 'Website with Facebook Login').

Related

Login with facebook - Insecure Login Blocked

I know that this question have been asked before, but my scenario is a bit different. I'm trying to implement login with facebook feature into my website, which has SSL, but when I attempt to login I get an error message:
Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://
Ideas?
This solution was tested on a django application using Facebook OAuth
NOTE
my site already had SSL and is accessible via https
But when trying to login using Facebook OAuth i get the above error (Insecure Login Blocked)
My Solution
all i had to do was to set ( this configuration is done within application setting :: settings.py )
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
helpful link
which literally means
use *https* instead of the default *http* when trying to login using social account e.g Facebook
Then i also set Valid OAuth Redirect URIs on facebook login settings to https://redirect_url.com
For non django application
If you're not using django, i believe there should be a base configuration file, where all your configurations for the application are done (it might be same file where you've configured your application to use social authentication).
Whatever library you're using to enforce social authentication, search for how you can allow redirect to be done via https instead of the default http and then add it to your application's configuration file.
I hope this helps someone save some time

FB login with devise

I am using devise in my rails app and doing FB login via oauth
I am successful in doing login from laptop but not through chrome android
Error url is https://m.facebook.com/v2.11/dialog/oauth?client_id=1709176549128219&redirect_uri=http%3A%2F%2Fconsiliumnsit.herokuapp.com%2Fusers%2Fauth%2Ffacebook%2Fcallback&response_type=code&scope=public_profile%2Cemail&state=c96b3d4ce6d9afd513a8239307092ef7be4c6a2c6888765b
When you created your app in facebook developer console you added a redirect uri. The request you are currently sending is coming from a url that you have not currently added. Go edit your project and add it
http://consiliumnsit.herokuapp.com/users/auth/facebook/callback
its on the left facebook login -> settings look for Valid OAuth redirect URIs you can add more then one

post facebook feed on Flash AIR Desktop using AS3

I need to share Facebook feed using https://graph.facebook.com/me/feed, so I searching and researching until I stumble upon FacebookGraphAPIDesktop.swc. But I failed to login, I already populate the required field (APP_ID, APP_ORIGIN) and make an adjustment on facebook app page too (App Domains & Site URL).
I already init the FacebookDesktop class and try to make a login connection using
var permissions:Array = ["email"];
FacebookDesktop.login(onLogin, permissions);
But it show popup windows contain JSON Invalid redirect_uri, OAuthException, code: 191
Any direction for dong this? bassically I need to show facebook OAUTH login popup and show feed dialog after the login success.
The environment is Flash AIR 17 running on Desktop (not mobile)
When working with Facebook for desktop and not using your own backend servers for login support, set the redirect URI to to https://www.facebook.com/connect/login_success.html.
If you are using your own servers, then the redirect URI should be set to the page that is going to handle the response from Facebook.
In either case, you will need to make sure that you log in to your app on the Facebook developer portal and set the app settings for desktop login and set that redirect URI in there.

Facebook authentication for both mobile & web app in Cakephp

Can anyone help me to overcome this hurdle..
My Situation:
I have a webapp (Facebook app) in cakephp, which will b accessed only after Facebook authentication(Its working cool).
& now I have a mobile app & which will work on restapi, I want the same above webapp code to be served as RestApi.
Now I'm able to do authentication for mobile app with facebook, I need to authenticate my webapp which will server as rest api(unless I cannot use the code inside the app)..
Requirement:
I have access_token & user_id with me sent by facebook to my mobile after successful login, & How can i authenticate my web app with these two..??
Can anyone look into this & help me to comeout..!!?
If you want to access Facebook data from inside CakePHP you have to send the access_token & user_id to CakePHP. You probably should narrow down your problem to a specific error or method that fails, here it's not really clear where your problem lies.

Facebook oauth server-side / no code exchange when ref=m_notif

I have a facebook app in a canvas that is working very fine.
I enabled referral authentification.
I recently enabled my mobile web app link, so now I can access my app from facebook app or from
http://m.facebook.com/apps/MY_APP
I coded the necessary server-side handling of the ?code= parameters to generate an access_token so it works fine. (I request access_token using a redirect_uri that is my current url up to "&code=")
My problem is when I try to open my mobile web app from an app request (on my mobile), The access_token request fails (surely because of the redirect_uri parameter).
After a lot of investigation I found out that the only problem was the ref=m_notif paramater.
Basically if I try to access my app with m.facebook.com/apps/MY_APP/*almost any string or parameter I want* it works
BUT
If I try to access my app with m.facebook.com/apps/MY_APP/?ref=m_notif it FAILS. any other ref=*string* is fine.
Do you know what I should do here ?
Thanks a lot