Twitter API Limit Mystery - twitter4j

I am mining some tweets from twitter via twitter 4j. My code is running on a server and until yesterday I had no issues however I have recently started to get this error.
403:The request is understood, but it has been refused. An accompanyll explain why. This code is used when requests are being denied (https://support.twitter.com/articles/15364-about-twitter-limits-updatng). message - Missing or invalid url parameter. code - 195
When I run the same code locally I cannot reproduce this error and I am allowed to mine tweets just fine. Furthermore I am confident that I am working within Twitter's rate limits and all I am accessing is tweets. I am not updating anything in my code. Finally, when I wait until the reset time and run the code on my server again, the same error occurs without allowing me to mine any tweets.
I have looked online and cannot find a solution to this problem. Has anybody encountered something similar? Please help.

Related

Live SDK - server_internal_error - message - An error occurred while retrieving the resource. Try again later

Currently it looks like the lice SDK returns error 500 for all request. Also the interactive SDK Microsoft provides here returns the same error:
http://isdk.dev.live.com/dev/isdk/ISDK.aspx?category=scenarioGroup_core_concepts&index=1
My application work without any changes for over 24 months. Has someone any more details or a workaround?
Update: I tried the following API calls both with the same result:
https://apis.live.net/v5.0/me?access_token=#Token#
https://apis.live.net/v5.0/me/picture?access_token=#Token#
Finally, and after a very long downtime (more than 20 hours) the Live API is up & running again.
Unfortunately, there is not even an official announcement from Microsoft.
Up & Running
Have the same problem and all of my apps worked before for very long time.
I'm using LiveSDK 5.6 and getting successful response for LiveAuthClient.LoginAsync with the following scopes: "wl.signin", "wl.basic", "wl.contacts_photos", "wl.contacts_skydrive",
"wl.skydrive_update"
LoginAsync returns LiveLoginResult object where:
Status = Connected
Session = {Microsoft.Live.LiveConnectSession} with AccessToken
but when app trying to call
Session (LiveConnectClient) object with GetAsync ("/me")
I'm getting the following exception
[Microsoft.Live.LiveConnectException] = {"An error occurred while retrieving the resource. Try again later."}
ErrorCode = "server_internal_error"
The OneDrive service experienced a service outage on the 9th, you can see from this 3rd party site for an idea of the timeline. We did not communicate this issue well to you and other developers that have come to expect excellence from OneDrive.
It is the start of a long weekend and I do not have more answers for you at this time, I'll circle back next week with better details on what to do in the future.
The Live Connect API that the LiveSDK works in conjunction with has been replaced by the OneDrive API, which also has SDKs for most major platforms. You will see major performance improvements and a larger feature set such as a modern sync API available for you with this new API if you transition to it.

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

Facebook API returns empty response only from specific IP

Suddenly simple Facebook Graph API calls started to return an empty result. The node I'm calling is a simple search page by name:
`https://graph.facebook.com/search?type=page&fields=profile_picture,username,id,name,likes,category,talking_about_count&access_token=<APP_TOKEN>&limit=10&q=stackoverflow`
It just started to return an empty result set when called from my server:
{"data":[]}
When I'm calling it from my personal computer browser, it works just fine.
I don't see any notification in Facebook Manage Apps page. What can be the reason? Is there any way I can see any error in this Graph API result?
UPDATE: suddenly it started working again, after it was down for at least 2 hours. Is there any way I can make these calls through client side JS? Any way to avoid to exposure of my APP_TOKEN?
UPDATE2: It stopped working again, and although I haven't identified the reason, I did figure when replacing the with a , it does work. The documentation actually says to use an APP_TOKEN.

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

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

fbgraph error code

Does anyone know where can I find all the error code and error type for FBGraph? While handling error, I want to check what error FBGraph throws (like: duplicate post error, access token expire error) and take action accordingly. (I a working on Ruby On Rails 3)
I referred the documentation, but it doesn't list out the code and type of all the errors. Where can I find these error codes?
Thanks... :)
This has long been a problem with using the Graph API. There's no documentation anywhere as to all the possible errors that you can receive. Additionally there are errors that you receive randomly that don't occur when you make the same request again (ie bugs).
A lot of the Graph API seems to have an underlying structure that makes FQL queries. So, when those FQL based queries throw an error you can find the code here: http://fbdevwiki.com/wiki/Error_codes#FQL_Errors