Well i started of by following all the instructions here:
http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo
I used the recommended fork of the facebook api and tried the latest from:
https://github.com/facebook/facebook-ios-sdk/
My problem starts with the following error:
< failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">< not-authorized/></failure>
The error is a reply from facebook to xmppframework s response to a authentication challenge. The response that is made by the iphone is base64 encoded msg when i decode it i find 2 of the values are null:
api_key=(null)
and the
session_key=(null)
This is obviously the reason facebook is returning that error. But the problem i have is i cant seem to find any where to set these values in the framework. Besides i think the session_key should be pulled in from facebook anyway.
I guess what i want to know is a couple of things.
Has any one got the xmppframework working with facebook on a iDevice?
If you have got it working did you have to stray from the path of the instructions on http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo ?
do you know of any other method to get facebook chat working on the iphone?
Any suggestions or help for my current dilemma would be appreciated. Happy to share my code if you want.
cheers
I wrote the Facebook integration for XMPPFramework. The api_key and session_key, come from a call to auth.PromoteSession. Facebook is trying to deprecate that call, so to enable it, you must follow step 7, in the HowTo:
Under Migrations, change Disable Deprecated Auth Methods from Enabled to Disabled and Save Changes.
Related
i have a problem here maybe sameone can help me: i install the Socialite pakcage to my laravel project and in start it work perfect with facebook , google and linkedin provider. But now it get always this message when i try to connect with facebook , and other provider connect perfectly.
What's wrong ?
ClientException in RequestException.php line 111:
Client error: GET https://graph.facebook.com/v2.8/me?access_token=&fields=name,email,gender,verified,link&appsecret_proof=5fbda0d218f94cb8024712269c053f0186d360efd82cd358b588eaf621e0c79c
resulted in a 400 Bad Request response:
{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthExce (truncated...)
I fix the problem !
You need the make same changes in vendor/laravel/socialite/src/Two/FacebookProvider.php file
See here:
github socialite
composer update will fix it by updating the laravel/socialite version
Oh, so I'm not the only one. Good. Waiting on the answer, I've lost like at least 60mins trying to figure this out, I'm quite sure it's gonna be something Facebook related. They're killing their 2.2 api, I guess, today, maybe they messed up something. :/
On our server-side authentication with Facebook we get a random and weird issue. Facebook calls the call back URL two times with the same code. This is only happening for some users and not on every login.
This is the flow we have implemented on our side: https://developers.facebook.com/…/manually-build-a-login-fl… . We have been using it since the beginning of 2013 and we haven't noticed any issues so far.
And this is the error we get when we are exchanging the code for an access token the second time.
{"error":{"message":"This authorization code has been used.","type":"OAuthException","code":100,"fbtrace_id":"traceID"}}
We tried to log this issue as a bug on https://developers.facebook.com/bugs but unfortunately it doesn't work.
It keeps showing unexpected error. Not to mention that i was unable to find the correct bug category.
Any idea on how we can fix this?
Thanks!
Could it be that users are clicking twice to process auth service? Try disabling the button before calling Facebook auth service
What language are you using?
I just had this problem in Ruby using Devise for Rails. I had created an omniauth.rb initializer file, and added a config line item in the devise.rb initializer file.
If you did this too, you can remove the omniauth.rb initializer file and you should be good to go!
I've create an facebook app and it run smoothly at
https://apps.facebook.com/icoloringstar/
But the problem is: when I search my app name "icoloring star" in facebook, it link to the app at url:
https://apps.facebook.com/icoloringstar/?fb_source=search&ref=ts
Then facebook said that:
App "iColoring Star" is unavailable
The app "iColoring Star" is temporarily unavailable due to an issue with its third-party developer. We are investigating the situation and apologize for any inconvenience.
We found that url part "ref=ts" cause above problem, but really do not know why?
Could you explain me why and how to resolve this problem?
Thank you very much.
It sounds like your code is failing when the ref parameter is supplied in the request path.
I was able to repro this with any arbitrary value in the ref parameter when accessing your app
Check your server logs and and see if you're returning a 500 error to facebook when the request comes in
See if you have any code that parses a ref parameter and check it's not throwing exceptions
Make sure your callback URL in the app settings doesn't also specify a ref parameter or your app may receive two values and/or fail entirely
It means 'Top Search'. User enter a query into the top of search.
There are some ref parameters.. ref=bookmarks for example. I dont know the full list.
Did you put your app on Facebook App Center?
I'm trying to authenticate on FB (and Twitter, also) using OAuth. Looking at the 3.5 CTP for DNOA, I was able to get the ASP.NET sample working.
But I'm lost about how to convert it to work in MVC3.
I tried the naïve approach and moved the sample code from FacebookClient.cs into a small assembly that I call from a controller action, but it dies here:
client.RequestUserAuthorization();
due to the fact that the HTTP headers have already been returned and cannot be re-written.
So I tried modifying this call to return an action result:
return client.PrepareRequestUserAuthorization().AsActionResult();
But this fails as it forces the browser to try and download something from facebook.
Does anybody have any advice on how I can get my MVC3 app to authenticate against facebook? I really wish DotNetOpenAuth's CTP included an MVC sample of OAuth2 authentication; I see a LOT of people banging their head against this. Andrew, save us!
Hmmm... things seemt to be working better now, using this:
fbClient.PrepareRequestUserAuthorization().Send();
It seems like FB may have been tweaking things on their end, but I am not sure.
Hey everyone,
I am trying to create an app in the google app engine for facebook, but I somehow got it caught in an infinite loop, and I can't figure out what to do to stop it. I copied some code from here
http://shelftalkers.googlecode.com/svn/trunk/shelftalkers/shelftalkers.py
to do the authentication, specifically this:
fb = facebook.Facebook(FACEBOOK_API_KEY, FACEBOOK_APP_SECRET)
if fb.check_session(self.request) and fb.added:
pass
else:
url = fb.get_add_url()
self.response.out.write('<script language="javascript">top.location.href="' + url + '"</script>')
return
And when I try to go to the page, it makes me authenticate, and then gets caught in a loop, so I am assuming that my if statement is fail, but I don't know what to do instead.
I am actually uploading this to facebook, so I don't think that the external authentication is the same. Any ideas on how to fix this? Thanks in advance
WWaldo
Hey WWaldo,
I also had problems with facebook authentication until I found a good app to learn from. At github.com there is a pretty good newer project that solves this problem. It is called runwithfriends and also is a facebook app where we can view exactly how it's done.
Cheers