facebook login throws Oauth Exception (certificate non found) - facebook

it looks like my problems with facebook (and twitter) never end, and it is certainly my fault.
I had a facebook app that was working properly. Today all of a sudden it stopped working. The cURL response is empty, the POST if you try does nothing or throws an OAuth excetion, and the only error I get when I get something is that the SSL certificate can't be found. It worked until some hours ago, so I really wonder what the problem is.
Even the login button seems to give the same error. Any clues on what I am doing wrong and/or should have updated some hours ago to get things going?
I tried to disable the SSL, following this discussion, but it's still not working...
Thank you very much in advance!

I have finally managed to resolve this too, although the solution isn't the best option, so, if someone has a more elaborate solution, I'll be glad to take notes.
For the moment, I was forced to add to the facebook php library (updated of course), and not to the page that is doing the job, the line
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
I wouldn't say it is an ideal solution though.

Related

Google redirect uri no longer saving?

This is so strange...
I implemented Google OAuth2 on Site A (I'm using Ruby on Rails), successfully adding localhost:3000/auth/google_oauth2/callback and sitea.herokuapp.com/auth/google_oauth2/callback to the redirect uri field in my Google Cloud Console.
Tried to do the same with Site B and... I can't set those darn redirect uris at all any more!
So I cheated a bit and used the Site A key and secret for Site B... and it all worked in localhost.
But when I finished in dev and tried to test in production by adding siteb.herokuapp.com/auth/google_oauth2/callback to that original Site A app... not only did it not get added, but the localhost and sitea uri's got deleted, and now I can't add those back.
Help, please? What might be happening, how do I test?
Thank you!
I've been having the same problem, I think it's an issue with Google Cloud Console.
I used the old user interface (https://code.google.com/apis/console) and it worked fine. Use this for the time being, it'll save you a lot of headache.
The redirect URI saving issue was a bug, and it should be fixed by now. Please leave a comment if you still encounter it. Thanks for reporting.

Facebook Login: Javascript and PHP Example

I was hoping that someone had a current example of using the Facebook Javascript SDK to login and then using te PHP SDK to handle the session the rest of the time.
I've been Googling and trawling the web for an accurate, working example but they all seem to have some limitations or bugs.
I'm finding that after logging in with JS, the PHP seems to fail to find the session more often than not. I can see a FBRS cookie has been set and is always active but this doesn't seem to help.
Really tearing my hair out with this one...
Cheers
Seems like all my problems with the sessions were because of this bug: developers.facebook.com/bugs/404450666302585
I've updated to the latest PHP-SDK version and everthing seems to be alright.

Unable to pass FB OAuth for my application

We faced with issue originally on the BB app. We stuck in browser whenever we use auth URL:
http://www.facebook.com/dialog/oauth?scope=publish_stream%2Coffline_access&redirect_uri=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&response_type=token&display=touch&client_id=127229817336080
Interesting what is wrong with the response because even desktop browser stuck.
We submitted issue to FB but still are looking for workaround. Any thoughts/ideas are appreciated.
Nothing wrong here, I just authed your app without problems....
whats wrong ?
i just installed your app with 2 extra permissions (posting as me & offline access token)
(just remember offline access token will be not available try to use long time tokens )
Even we faced similar type of problems in authenticating our FB App. Authentication window use to hang up and nothing use to happen and symptoms were same as you are facing. Probably this may not be the answer to your problem but it might be worth knowing that FB SDK have such issues if your application runs on non-standard ports. The standard ports are 80 and 443. Once we started running our app on these ports the error was gone.

Facebook API infinite refresh

I am using the standard commenting link and facebook api from github. For some reason today it decided that any page with comments will go into an infinite refresh. I added the line for Oauth 2 and it didn't solve the problem.
It has worked fine for several months, but the problem started today for no reason. Only happens when the person is logged into facebook.
Most commonly I find this occurs because something in the session borked up.
So you have a partial connection and it loops to complete the connection but its expired and doesn't clean down properly.
Clearing your session cookies and restarting the session, and it not looping will indicate this is the problem and additional code will need to be added to detect a bad/partial session.
Possibly just a bug in the code, or a temporary problem with the Facebook API.

Twitter page no longer exists, Token used error

I am working on implementing sharing an image via Twitter in my application and I have come across this page.
When I run my app in my simulator I can no longer log into Twitter. I get a page stating that "This page is no longer valid. It looks like someone already used the token information you provided."
I have gone to Twitter and to the Applications page and removed this application to try again. I still get this warning page though.
When I try to run the app on my device it crashes when I tap the Twitter Button.
Has anyone found a solution to this?
Or if someone could point me to a solid Twitter/TwitPic reference tutorial that actually works that would be great as well.
Check these sample twitter apps source codes, will lead you for smooth implementation,
https://github.com/bengottlieb/Twitter-OAuth-iPhone
https://github.com/luciuskwok/HelTweetica
https://github.com/takuma104/ntlniph
http://code.google.com/p/tweetero/
http://jaanus.com/post/1451098350/an-example-iphone-twitter-app
I got this problem.
Woah there!
This page is no longer valid. It looks like someone already used the
token information you provided. Please return to the site that sent
you to this page and try again. It was probably an honest mistake.
Turns out the fix for this was simple although it took some hunting down!
The date/time on the server running the app had somehow become a day behind.
Twitter checks the time sync when using the API, and if the client doesn’t have the correct time, it’ll report the above error.
Maybe you've got some loop or a method that is being called twice?