Like button on content will not work until URL is submitted to Facebook debug tool - facebook

I'm troubleshooting an issue where the Like button won't work on my site unless the URL is submitted to the Facebook debug tool.
When I hit like I'm seeing two requests fire to comment_widget_shell.php. Once succeeds (302 found), while the other fails, showing a status "(canceled)" and type "pending":
The successful request:
Request URL:http://www.facebook.com/plugins/comment_widget_shell.php?locale=en_US&master_frame_name=f236db264&offsetX=0&sdk=joey
Request Method:GET
Status Code:302 Found
The failed request:
Request URL:https://www.facebook.com/plugins/comment_widget_shell.php?locale=en_US&master_frame_name=f236db264&offsetX=0&sdk=joey
As of the writing of this question, here is an example URL where like fails:
http://www.zujava.com/geisha-makeup
I iniitally thought it was this Stack Overflow issue, as the site runs on a platform somewhat similar to Heroku, but for Drupal (Pantheon) and I can't reproduce the issue locally. However, I contacted Pantheon support and they reported the Heroku limitation does not exist on Pantheon.
I'm not sure what other tools I can use to debug this. My article pages get a clean report from the Facebook Debugger. Any ideas or tips of what I can look deeper into?

I have had pretty good luck with pantheon. If your just trying to get a like button on drupal why not use http://drupal.org/project/fb_social/ I have used this in d7 and d6 and I have never had a problem.
Pantheon should be able to handle a request to facebook for sure
thanks
Nick

Related

Errors from Facebook graph API on posting - Service temporarily unavailable

Recently I get temporary errors from Facebook API after user is trying to share a post through "me/feed" route.
The error message is :
"message":"Service temporarily unavailable",
"type":"FacebookApiException",
"is_transient":true, "code":2,
"error_subcode":1609010,
"error_user_title":"URL Not Found",
"error_user_msg":"We had trouble using the URL you provided. Please try again later.",
"fbtrace_id":"DgSULoXJMfK"
Anyone know what could be the reason for this?
I'm pretty confident this is a bug. We're finding that the exact same post will fail when published to some pages, but succeed on others. This sort of inconsistency along with the feedback of others (see below) suggests that this behavior is due to a bug.
https://developers.facebook.com/bugs/1571642049794292/
I've the same error when try to use Facebook OAuth2 with scope=email name
Fixed by setting scope=email

Unable to post reply to _some_ comments

Sometimes, when I post a reply to a comment through the graph API on a FB page (replies are enabled in the page parameters), I get generic FB "transient" errors which are not transient:
{u'error': {u'code': 2, u'message': u'An unexpected error has occurred. Please retry your request later.', u'is_transient': True, u'type': u'OAuthException'}}
A typical example is: https://www.facebook.com/VoyagesSncf.com/posts/377070219021428 where I cannot even post replies myself using the FB web interface.
I wonder if someone would know what could cause this specific FB discussion to behave this way and what I could do to detect programmatically that I need to give up on posting a reply and s
It seems to be a facebook api's bug, reported here: https://developers.facebook.com/bugs/281179468741734/
I've got the same problem while creating a new (even unpublished) post. But it is transient indeed, but it may took a few ours, when facebook will behave as expected.
I'm afraid, there is no workaround for this issue for now.

Error in Facebook Connect with Devise on Rails

I have spent a few hours trying to debug this issue and while there are several answers I couldn't get this to work and don't understand a few things.
I have Facebook login implemented with Devise on my Rails 3 App deployed on Heroku. I have this working fine on localhost and I had this working on production as well. I don't think I changed anything but I found out that the Facebook login was broken and can't figure out how to fix this. A few clues that may ring a bell for some -
The url I am getting where the error shows is below with the error message that many others posts show. What I find strange is the following -
Decoding the url below the redirect_uri has a port number http://www.mygreenneighbor.com:24745/auth/facebook/callback&scope=email,offline_access&
I don't think the app on Heroku is listening at this port 24745 (which btw changes when I try it after sometime) and I haven't noticed that before - is that expected?
When I make changes to my Facebook app and change the site url that change doesn't show up in the redirect uri. Does it take time for FB changes to take effect?
https://graph.facebook.com/oauth/authorize?client_id=159903734070492&redirect_uri=http%3A%2F%2Fwww.mygreenneighbor.com%3A24745%2Fauth%2Ffacebook%2Fcallback&scope=email%2Coffline_access&response_type=code
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
Thanks for your thoughts/guidance.
-S
After a lot of digging around, I cam across this article
http://www.kbedell.com/2011/03/08/overriding-omniauth-callback-url-for-twitter-or-facebook-oath-processing/
I realized that I had switched to using Passenger as my web server from a singled threaded/process WebRick webserver. Passenger has more than one process running on the same dyno and apparently it sends a callback url with a port number in the request. To override that I used the advice in the above article and set the following in my applicaiton.rb file
OmniAuth.config.full_host = "http://www.mygreenneighbor.com" and it solved the problem.
Hope this helps someone.
-S

ref=ts on facebook app url cause app not found error

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?

facebook chat on the iphone using xmppframework

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.