I am using MGTwitterEngine for iPhone to support twitter, I am getting error(403) while posting a message second time how to handle this issue.
That is.. Let the message is "what are you doing" I am posting using [mTwitterEngine sendUpdate:"what are you doing"] for first time it is posted successfully, if i want to post the same message again it is throwing 403 error.
How to handle this?
Can i put the alert "Duplicate message" if error no 403? Is 403 error for duplicate messages only?
Added : Is it possible to check if an message is already posted in MGTwitterEngine?
The 403 error is not only for duplicate message so that you cannot throw the error message to user.
http://developer.twitter.com/pages/responses_errors
You have to find the duplicate message in your application code by keeping the last updated message.
Related
In my messenger platform app, when I make this request:
GET https://graph.facebook.com/v2.8/${psid}?access_token=PAGE_ACCESS_TOKEN
(to get users public info based on their PSID), sometimes Facebook returns this error:
'There is an error when trying to get the user\'s info from Messenger:\nError: failed [400] {"error":{"message":"(#100) Invalid parameter","type":"OAuthException","code":100,"fbtrace_id":"FpUUkuX0egc"}}'
I have no idea why this happens, because when I saw the error then I manually made the same request (by using POSTMAN), I got the correct result (user public profile) with no error.
Maybe you can check if POSTMAN is sending something in the headers in a different way that you are doing. It happened to me something similar and it was that POSTMAN was "correcting" something.
Compare the request from POSTMAN and the one you are doing with your app side by side.
If that doesn't work, let me know and I'll look into another option. :)
I'm trying to login to the application using Facebook, but it always ends up with a bad request. I have read the documentation for Guzzle and Googled but no luck. Now i turn to you and hope that you can give me a hint.
This is the message that i got:
message:
"Client error response [url] https://graph.facebook.com/oauth/access_token?code=AQDRoV9AGzp-tltxQTh59UeYxfyGsThHQdc4UJ29fIh0g5iS1dKpmj2Bjjx-831WSUwVVYpIWD19crEFL0IrZPdHbl0g53bD4l1IvW0tbUTpSEzAZf-YO_zmHJFsYptwc-29DeuOuadHycPIA49O65SWQ9TDDJNSxXRmYtKYq2tbdwHczyxaupQA9IxIbaisHvHxaa3G6xURNKRiLSzKD9Qd_g4RHox-7vlYu4HZ2YljEnFAkmH7bYsKm61okTjv8JPhzQ16PXMcAwVOWpidMog7bGYzi09C7Prp5lkUUsvECIv1wwL2MNIXblDrdeW4GaU&client_id=1588368691378794&redirect_uri=http%3A%2F%2Flocalhost%3A9000&client_secret=445f1f93a81d0c24d5fbc4eb51ead669 [status code] 400 [reason phrase] Bad Request"
type: "GuzzleHttp\Exception\ClientException"
Any idea?
Solved this one. It was a trailing "/" that was missing
Today I started receiving errors from Facebook when my app tries to post a message.
The app successfully authorised, Facebook message window pops up, everything looks fine (links, pics, description) , but when I press post. it times out with this message
Encountered an error while processing the request: 502 Error parsing server response. Got EOF while waiting for outstanding responses Please try resending your request. This is probably not a bug in proxygen. Based on experience, either intern or latest is temporarily down due to a SEV or push. Please check in e FYI or #e first. If the error persists through retries, or if you have good reason to suspect this is a bug in proxygen, please report the issue to ti-bugs#lists or #ti with the following debug information: 2012-05-20 22:24:40 slb010.02.snc5 1585267068836963531
UPDATE: It is a Facebook issue. There is an opened and assigned bug report here You can subscribe there to follow the process.
It looks like Facebook fixed the issue. My apps work fine.
If you still experience the same problem, you can check out the progress here: http://developers.facebook.com/bugs/411849912170144?browse=search_4fb9fb43db2468a28526107
If this issue comes up again check whether there is an already submitted bug here: http://developers.facebook.com/bugs/ if there isn't submit one
In my iphone app i am using Twitter-OAuth-iPhone to post and retrieve data from Twitter. The problem is that when someone wants to post a tweet twice(maybe by mistake) i need to tell him that the tweet was already posted.
when i do this i receive a 403 error from Twitter:
request failed with error Error
Domain=HTTP Code=403 "The operation
couldn’t be completed. (HTTP error
403.)"
the message doesn't tell me that i tried to post a duplicate Tweet. The 403 code, as specified here, is used when requests are being denied due to update limits.
A solution that i thought of is to keep in my app a list of tweets that where posted (an archive) that will be checked every time a new tweet is sent. The problem with this solution is that if someone is updating his twitter status from the web or other app it will fail because the archive from my app will not be updated.
I found a comment that says that the 403 code is just for duplicate tweets, but the documentation says otherwise.
EDIT:
on https://github.com/mattgemmell/MGTwitterEngine it says that:
In these cases you'll receive a call
to requestFailed:withError: which will
include an NSError object detailing
the error. Twitter usually returns
meaningful HTTP error codes (like 404
for 'user not found', etc), and in
that case the -domain of the NSError
will be "HTTP" and the -code will be
the relevant HTTP status code. The
userInfo of the NSError will contain a
key "body" that may contain the
response body and "response" which
will contain the NSHTTPURLResponse.
This makes it really, really easy to
know what's happening with your
connections.
but the userInfo attribute of the NSError that i receive in my app is null.
The problem is that Twitter-OAuth-iPhone for 4xx responses does not return the response body.
A solution could be to modify the MGTwitterEngine to provide the full error message. An example can be found here.
I use LinkedIn-iPhone API to update LinkedIn status, which worked for several times, but most times it does not work well, and it has never worked for the last 5 days. I don't know whether it is the problem of the LinkedIn web site or API connections.
The console log:
++ LinkedIn engine reports failure for connection
98A66D65-A8EB-4ADF-9B03-76EA54AE5DAE
The operation couldn’t be completed.
(HTTP error 400.), error: Error
Domain=HTTP Code=400 "The operation
couldn’t be completed. (HTTP error
400.)"
Is the error from the unstable LinkedIn API? or my code?
Silly me, I found the problem of HTTP error 400, which means: Duplicate updates. I changed the message for updating then it works fine.
Not sure whether moderator should delete this post or not? or how do I close it?