Question

I don't want default twitter to open because it should be compatible with ios < 5 also .

I've used MGTwitterEngine. But it doesn't post tweets. Before few days it was working fine with ios5 too. But now it's not working. I think twitter demo url is depreceated , or not supported with ios5 & 6. What could be the reason? while posting something to twitter the request gets failed & I'm gettiing following error :

Error Domain=HTTP Code=404 "The operation couldn’t be completed. (HTTP error 404.)

Any help would be appreciated !!

Was it helpful?

Solution

Modifications... 1. Change the TWTTER_DOMAIN in the MGTwitterEngine.m line 40 (pat posted). 2. Chenge the OAuthConsumer.h remove all OAuthconsumer strings. 3. Chenge the HTTP url with SA_OAuthTwitterEngine.m line 65~67, add the api string before twtter.com

OTHER TIPS

Twitter deprecated API version 1 url.
In MGTwitterEngine.h line 40 change

#define TWITTER_DOMAIN          @"twitter.com"

to

#define TWITTER_DOMAIN          @"api.twitter.com/1"

More info https://dev.twitter.com/discussions/10803

Version 1 of the API is now deprecated. This document may describe an outdated version of the API. Please move to Version 1.1 of the API as soon as possible.

Go through this document.

https://dev.twitter.com/docs/api/1.1/post/direct_messages/new

Point to be noted

  • Api format should me json
  • Api version v1.1
  • sender and receiver should follow each other.

Example Request

POST : https://api.twitter.com/1.1/direct_messages/new.json
POST Data : text=hello&screen_name=rajneesh071

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top