Coder Social home page Coder Social logo

mgtwitterengine's People

Contributors

btjones avatar catsby avatar jabley avatar luciuskwok avatar magicseth avatar mattgemmell avatar protocool avatar richardbuckle avatar src256 avatar stevestreza avatar tarasis avatar uliwitness avatar violasong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mgtwitterengine's Issues

Newbie Question

Hi,
How can I use this so the user just enters their username, password and then it post a tweet? I have had this done using basic auth. and need to switch. Thank you!

Communication?

Current collaborators are myself, mattgemmell, aral, ctshryock, and MrRooni. Should we just use GitHub issues for now?

Deprecate basic auth and add XAuth capabilities

Twitter has repeatedly said that basic auth (via password) will be deprecated in June 2010. MGTwitterEngine should support OAuth login. We should also factor xAuth into any revamping made in this area.

"Invalid / used nonce" error for enableUpdatesFor: with xAuth

enableUpdatesFor:, and possibly other methods, fail when using xAuth. Twitter returns an "Invalid / used nonce" error, even though the nonce is valid.

The problem seems to be caused by an extra '?' being added to the beginning of the POST body.

I think there is an explanation needed on how to use this

Hello,

Since the code won't compile after a checkout can please someone explain on how to get this code working and how to use it? I know that there is a need to gat three other project's Source Code but can't figure out which Version from yajl is needed. After copying the source files into a yajl Folder the Files will stay red in XCode. If someone manages to get those Files, will the instructions in the readme still work? Do I have to copy now all the Sourcefiles into my Project including yajl, TouchJSON and OAuthConsumer?
It would be nice if the guys who made all the extension would write a small How To on how to this thing working.

Thank you very much

twickl

Date with Locale is not working

Hi,

In MGTwitterXMLParser.m in parser function the create date "created_at" isn't working in iPhones with dates not in english.

You can avoid this adding a locale to NSDateFormatter

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]]; // ADDED THIS LINE TO AVOID PROBLEMS WITH DATES
dateFormatter.dateFormat = @"EEE MMM dd HH:mm:ss +0000 yyyy";
NSDate *creationDate = [dateFormatter dateFromString:[currentNode objectForKey:elementName]];
[dateFormatter release];
if (creationDate) {
[currentNode setObject:creationDate forKey:elementName];
}

Kind Regards

base64EncodingWithLineLength error

While running the library in iPhone 3.1 I get the following error...

*** -[NSConcreteMutableData base64EncodingWithLineLength:]: unrecognized selector sent to instance 0x3d17e50

...on line...

NSString *authValue = [NSString stringWithFormat:@"Basic %@", [authData base64EncodingWithLineLength:80]];

...of this method...

  • (NSMutableURLRequest *)_baseRequestWithMethod:(NSString *)method
    path:(NSString *)path
    requestType:(MGTwitterRequestType)requestType
    queryParameters:(NSDictionary *)params

It should be noted that the same code runs fine in the Simulator.

Any help will be much appreciated.

Missing OAuthConsumer files and out-of-the-box Demo experience

I'm new to Xcode development and haven't had any experience including third party code into my own project, so I ran into some confusion trying out MGTwitterEngine. I'm stuck trying to get all the correct versions of the missing files and there were some gaps in the README file that I recommend should have a few comments about this.

I git clone'd the latest version of MGTwitterEngine and went to open the main MGTwitterEngine.xcode.proj file. My first impulse was to enter the Demo directory and simply hit Command-Enter to see if the demo would compile. Naturally I got a lot of error messages, and then saw all the red files & folders in the Groups & Files pane, indicating missing files. So I individually dug up TouchJSON/OAuthConsumer/yajl and started to copy them into the expected folders. However, I got stuck on the filed for by OAuthConsumer.

The site at http://code.google.com/p/oauthconsumer/ refers to http://code.google.com/p/oauth/ for its downloads and http://oauth.googlecode.com/svn/code/obj-c/OAuthConsumer/ seems to contain most of the required files. However, it was missing OACall.h/m and OAuthProblem.h/m as well as hmac.h/c and sha1.h/c from the Crypto folder. There appeared to be a version with the missing files at http://github.com/jdg/oauthconsumer, which in turn was missing OAToken_KeychainExtentions.h/m.

Then I just copied the OAToken_KeychainExtentions.h/m files from the Google Code repository along with the rest of the files from the github release, added my Twitter username/password and consumer keys to the Demo and got everything to compile. However, the app crashes, presumably somewhere using hmac_sha1, but I'm not versatile yet in debugging using Xcode to narrow it down any further.

So my question is, what's the best OAuthConsumer release I should be using here and what else do I need to do to compile the demo? Are all these files even needed for the demo? If not, what would I need to do/define to avoid the dozens of compile errors I get without them?

README.txt misleading

Hi,
to me it seems that the README.txt is wrong, because it doesn't even hint on missing external dependancies, like yajl (and maybe more, like an OAuth framework (which is not yet clear to me if this is to be added by me as well, but I assume so).

So maybe somebody would like to write a few more points how to either get an "empty" commandline project or the demo project compiled properly.

Regarding yajl I downloaded the missing files already and referenced them into the project. I still have problems with the search paths for the (system-) headers.
I found another Git project, which is an Objective C wrapper for yajl. This guy did connect to the yajl-project via a linked binary library, which is produced somewhere in the build process. I admit I curently know more about Objective-C and the usage of the Apple frameworks than how to copy with external libraries in Xcode.

So if somebody of the more experienced contributors has a heart, please write some hints how to get the first step done.

Thanks in advance!
Thomas

Out of the box HTTP error 401

Hallo, I'm trying to use this code in my iPhone project, but I can't get the demo woking. This is what it says:

2010-07-12 12:12:01.104 MGTwitterEngine[38890:a0f] Request failed for connectionIdentifier = 8F173B61-AAAD-4DD1-A389-00E9C30F2401, error = The operation couldn’t be completed. (HTTP error 401.) ((null))
2010-07-12 12:12:01.107 MGTwitterEngine[38890:a0f] Connection finished 8F173B61-AAAD-4DD1-A389-00E9C30F2401

I have username, password, consumerKey and consumerSecret that should be right. I have all the code for yajl, OAuthConsumer and TouchJSON.

I don't know what am I missing...

I'm using mac os X 10.6.3.

Also when I run it as x86_64 debug mode I get a “SIGABRT”. But if I change to release or to i386 it works ok.

If you need more info tell me.

Thank you.

Bug with array support in MGTwitterSearchYAJLParser

This causes problems when results contain array within another array. For example, geo coordinates array in twitter search results

-(void)startArrayWithKey:(NSString *)key {
.........
insideArray = YES;
}

Sample data :
{"results": [
{
"profile_image_url": "http://a3.twimg.com/profile_images/725334411/Home_Icon-V2_normal.jpg",
"created_at": "Mon, 20 Sep 2010 01:34:36 +0000",
"from_user": "brambleton",
"metadata": {
"result_type": "recent"
},
"to_user_id": null,
"text": "RT @PostSports: #Redskins Trent Williams says he "just got banged up," but he'll have an MRI exam on his left knee: http://wapo.st/djWtMv",
"id": 24985018198,
"from_user_id": 3697568,
"geo": {
"type": "Point",
"coordinates": [
38.9801,
-77.5023
]
},
"iso_language_code": "en",
"place": {},
"source": "ÜberTwitter"
},

Add support for Twitter lists

Twitter's list API lets you view and edit list details and members. The feature should be added as APIs to MGTwitterEngine.

Pass MGTwitterEngine instance to delegate callbacks

Would it be possible to create a new set of delegate callbacks (and deprecate the old ones) which also pass back the MGTwitterEngine instance, similar to how most of Apple's delegate callbacks work?

E.g.:
-(void)requestSucceeded:(MGTwitterEngine *)mgt forID:(NSString *)connectionIdentifier;

Having the MGT engine to query state would be helpful in a lot of cases. For example, testing if the access token has been set yet.

Thanks.

NSInvalidArgumentException

When running MGTwitterEngine the App is shut down with following message at Debugger Console:


2010-07-15 08:29:12.770 APP1[290:207] +[OARequestParameter requestParameter:value:]: unrecognized selector sent to class 0x38918
2010-07-15 08:29:12.794 APP1[290:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[OARequestParameter requestParameter:value:]: unrecognized selector sent to class 0x38918'
*** Call stack at first throw:
(
0 CoreFoundation 0x02727919 exceptionPreprocess + 185
1 libobjc.A.dylib 0x028755de objc_exception_throw + 47
2 CoreFoundation 0x027294eb +[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02699116 __forwarding
+ 966
4 CoreFoundation 0x02698cd2 _CF_forwarding_prep_0 + 50
5 App1 0x00013301 -[MGTwitterEngine(OAuth) getXAuthAccessTokenForUsername:password:] + 376
6 App1 0x00008232 -[ArenaView setTwitterEngineCredentials] + 337
7 App1 0x00006397 -[ArenaView touchesEnded:withEvent:] + 6989
8 UIKit 0x003d9d20 forwardMethod2 + 92
9 UIKit 0x003382ff -[UIWindow _sendTouchesForEvent:] + 567
10 UIKit 0x0031a1ec -[UIApplication sendEvent:] + 447
11 UIKit 0x0031eac4 _UIApplicationHandleEvent + 7495
12 GraphicsServices 0x02e69afa PurpleEventCallback + 1578
13 CoreFoundation 0x02708dc4 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52
14 CoreFoundation 0x02669737 __CFRunLoopDoSource1 + 215
15 CoreFoundation 0x026669c3 __CFRunLoopRun + 979
16 CoreFoundation 0x02666280 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x026661a1 CFRunLoopRunInMode + 97
18 GraphicsServices 0x02e682c8 GSEventRunModal + 217
19 GraphicsServices 0x02e6838d GSEventRun + 115
20 UIKit 0x00322b58 UIApplicationMain + 1160
21 App1 0x0000239c main + 102
22 App1 0x0000232d start + 53
)
terminate called after throwing an instance of 'NSException'


All param's are set!
Any advice, hints or solutions to solve?
Thanks in advance!

getSearchResultsForQuery returns just source_api_request_type

Calling [twitterEngine getSearchResultsForQuery:@"from:al3x"](which is an example from the Search API page)

I get this array:
searchResults = (
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
},
{
"source_api_request_type" = 37;
}
)

Which is missing all of the actual data.

I have verified that the jsonData contains all of the relevant data. It appears that the parser is broken.

Bugs in xAuth, retweet and delete when using TouchJSON.

There were problems when using TouchJSON

  1. Problems getting the token when using getXAuthAccessTokenForUsername. The problem was that the response from the xAuth http://dev.twitter.com/pages/xauth isn't JSON format to the parsing failed when it got the reponse.

  2. There were problems using any method that had an empty POST body. Methods such as retweet, deleteUpdate resulted in signature problems and 401 (authentication) response.

I've fixed these 2 bugs in 7b572ca on lepah/MGTwitterEngine.

Error Code 401

i m using twitter engine to diplay the friend list... but whern i login user name and password i show me alert "user name/password is worng. " and in console ...

2010-09-06 11:29:19.189 TwitterPostDisplay[1317:207] Request failed for connectionIdentifier = 78712C93-C21B-4852-B9F0-FF45779F3211, error = The operation couldn’t be completed. (HTTP error 401.) ((null))
2010-09-06 11:29:19.193 TwitterPostDisplay[1317:207] Connection finished 78712C93-C21B-4852-B9F0-FF45779F3211

i don't the exact reason....
pls help me...

How to manage multiple accounts?

How to manage multiple accounts on iPhone?
I know I can store one token with:
[aToken storeInUserDefaultsWithServiceProviderName:@"twitter" prefix:@"token"];

but how to store others tokens and switch between them?
thanks

YAJL parser no longer deals with search results properly

Since April 1st (maybe this is all a bad joke), MGTwitterEngine isn't dealing with my search results properly.

Suspect it is related to this: http://groups.google.com/group/twitter-api-announce/browse_thread/thread/983086ae9935d50c, as search results are now delimited by the new 'metadata' dictionary that is in the search results: consequently some fields for a status are returned separately from others:

search: dictionary start = (null)
search:   results: profile_image_url = http://a1.twimg.com/profile_images/759588518/Picture0007_normal.jpg (NSCFString)
search:   results: created_at = 1270227708 (NSCFNumber)
search:   results: from_user = BieberIsOurDrug (NSCFString)
search: dictionary start = metadata
search:   results: result_type = recent (NSCFString)
search: dictionary end
search:   status: to_user_id = <null> (NSNull)
search:   status: text = Hahaha ! I didn't know @justinbieber said "bitch" in the thing for Bieber Or Die (NSCFString)
search:   status: id = 11490430212 (NSCFNumber)
search:   status: from_user_id = 98209887 (NSCFNumber)
search:   status: geo = <null> (NSNull)
search:   status: iso_language_code = en (NSCFString)
search:   status: source = <a href="/devices" rel="nofollow">txt</a> (NSCFString)
search: dictionary end

In the above, the section before the metadata ends up split off from the one after it when returned in searchResultsReceived:forRequest:, despite it being from the same status.

EXC_BAD_ACCESS crash with spaces in user name

Steps to reproduce:
1 #define TESTING_SECONDARY_USER @"chocken berry" // note space
2 uncomment the line NSLog(@"getUserTimelineFor: connectionIdentifier = %@", [twitterEngine getUserTimelineFor:TESTING_SECONDARY_USER sinceID:0 startingAtPage:0 count:3]);
3 Observe EXC_BAD_ACCESS crash

I'd settle for at least defined behavior here, even if it's just throwing an exception, but ideally the engine should be robust against such malformed input and fail the request via normal delegate methods. Also, methods to help client programmers validate user input would be helpful here. Thoughts welcomed.

non-existant NSDate call on iPhone platform

this causes compilation to fail with -Werror

was fixed in 3400870 but reverted by e775488 - no reason was given, so I'm not sure whether my own change will meet the criteria that the first fix failed.

iPhone OS not-with-standing, the current way this is done uses dateWithNaturalLanguageString:, which is described on the Apple docs with the following caveat:

This method supports only a limited set of colloquial phrases, primarily in English. It may give unexpected results, and its use is strongly discouraged.

I have changed this to use NSDateFormatter, as recommended by Apple.

miketomasello/MGTwitterEngine@8bae8f787e6e2b72dee23d08bb6d9b50f14398e5

Favorites returns a 401 code

Hi,

I am using favorites api.
E.g. /1/favorites/create/21993683042.json

Tested with twurl: twurl -X POST /1/favorites/create/21993683042.json
It works as expected.

The same call on MGTwitterEngine fires a -requestFailed: withError:
Error is: Error Domain=HTTP Code=401 "Operation could not be completed. (HTTP error 401.)
Any idea?

Thanks.

Incorrect Format Sequence Used for Tweet IDs

Hey y'all,

On line 1033 of MGTwitterEngine.m (HEAD as of a couple of days ago), %u is used to convert the tweet ID into a string. However, the type of the ID (according to the method signature) is unsigned long, thus it should be changed to %lu.

This was the cause of a bug in Bluebird that stopped the "in reply to" flag from being set on reply tweets. I can only imagine that other devs also experienced this bug, but just silently fixed it themselves and didn't share. sigh :)

-Matt

Merging changes from amazingsyco/MGTwitterEngine

My fork of MGTwitterEngine has some additions to make it easier for subclasses to override the networking layer. I'd like to move these changes into the main trunk. You can see them in the fork queue.

I'm a collaborator so I can do this, but I wouldn't mind a few eyes taking a look at it first.

Which files are required for just the "login" check?

Hi there, I would like to send Tweets from my iPhone App, just need the "login" check step. So I think the FULL MGTwitterEngine is an overkill for this one function, and wonder which files are required?

I guess I only need fewer than 6 files to do this "login" check?

Thanks for any hints!

MGTwitterEngine.m compile error

When setting USE_LIBXML=1, MGTwitterEngine.m will not compile. The error is on line 755, specifically the parameter initWithData. The argument being passed is jsonData, but it should be xmlData, because jsonData is #ifdef'd out in this particular use case.

In my experience, simply setting jsonData to xmlData fixes the compile.

Unused variable causes compilation to fail with -Werror

MGTwitterEngine.m, lines 974-979:

- (void)connectionDidFinishLoading:(MGTwitterHTTPURLConnection *)connection
{
    NSString *connID = nil;
    MGTwitterResponseType responseType = 0;
    connID = [connection identifier];
    responseType = [connection responseType];

responseType doesn't seem to be used after here, and it causes the compiler to choke if you are compiling with "Treat warnings as errors."

Content-Type not being set

Reported by mathieut in #5. For almost all requests, the Content-Type header should be set to application/x-www-form-urlencoded. Currently, MGTwitterEngine doesn't set the Content-Type at all.

problem with deleteing tweet

Hi,

I am using the MGTtwitterengine in my app. I want to delete a tweet and I am not sure how do I do that.
I tried using deleteUpdate method but I was not successful.

I would appreciate if you could help me.
Here is my code to delete the update.

myNumber = [tweets objectAtIndex:indexPath.row];
unsigned long fooo = [myNumber unsignedLongValue];

NSLog(@"fooo:%@", fooo);
[_engine4 deleteUpdate:fooo];

Can you please give me a format of the delete tweet code.
Thanks,
Swetha.

POST method parameters are handled incorrectly

I'm reposting this issue from the #5 OAuth issue comments because the bug affects all URL requests, not just OAuth ones, but it only manifested itself with OAuth support.

The -[MGTwitterEngine _baseRequestWithMethod:...] method does not properly handle query parameters. It adds them to the URL for all types of HTTP methods, when it should add them only if the method is not POST.

The solution is to add a condition to the if statement in that method which checks that method is not equal to HTTP_POST_METHOD or @"POST".

MGTwitterYAJLParser

MGTwitterYAJLParser.h, comes with an error at " #import "yajl_parse.h" "(can't be found) which is normal (there is no such file).

Also MGTwitterYAJLParser.m, comes with an error at :

@interface MGTwitterYAJLParser : NSObject {
__weak NSObject *delegate; // weak ref
NSString *identifier;
MGTwitterRequestType requestType;
MGTwitterResponseType responseType;
NSURL *URL;
NSData *json;
NSMutableArray *parsedObjects;
MGTwitterEngineDeliveryOptions deliveryOptions;

yajl_handle _handle;

}

" Expected specifier-qualifier-list before "yajl_handle"

Are there any extra changes to be made after the 1.0.8 version ? (before the Github), cause before that, everything worked fine.
Thank you for your time

Convert libxml and yajl code to use TouchXML/TouchJSON

The TouchXML and TouchJSON codebases have nice fire-and-forget APIs which create object trees for the document (TouchXML returns an API like NSXMLDocument, and TouchJSON returns native NSArray/NSDictionary objects). These will be much less error-prone for the engine to use, and will require much less code to send to delegates.

bug with Search Method

Hi all,

I use
- (NSString *)getSearchResultsForQuery:(NSString *)query;
for searching this query: to:ncsomofriend OR to:ncsomo
and I found the response results to this delegate quite strange:
- (void)searchResultsReceived:(NSArray *)searchResults forRequest:(NSString *)connectionIdentifier {

(
{
"created_at" = 1273651741;
"from_user" = thanhcongvo;
"profile_image_url" = "http://s.twimg.com/a/1273620457/images/default_profile_4_normal.png";
"result_type" = recent;
"source_api_request_type" = 35;
},
{
"created_at" = 1273651665;
"from_user" = thanhcongvo;
"profile_image_url" = "http://s.twimg.com/a/1273620457/images/default_profile_4_normal.png";
"result_type" = recent;
"source_api_request_type" = 35;
},
{
"completed_in" = 0;
"from_user_id" = 113120734;
geo = ;
id = 13839034156;
"iso_language_code" = lt;
"max_id" = 13839071338;
page = 1;
query = "to%3Ancsomofriend+OR+to%3Ancsomo";
"refresh_url" = "?since_id=13839071338&q=to%3Ancsomofriend+OR+to%3Ancsomo";
"results_per_page" = 15;
"since_id" = 0;
source = "<a href="http://twitter.com/\">web";
"source_api_request_type" = 35;
text = "@ncsomo 100K okie?";
"to_user" = ncsomo;
"to_user_id" = 85458822;
total = 2;
}
)
this is my search result when I use CURL:

{
"results" : [{
"profile_image_url" : "http://s.twimg.com/a/1273620457/images/default_profile_4_normal.png",
"created_at" : "Wed, 12 May 2010 08:09:01 +0000",
"from_user" : "thanhcongvo",
"metadata" : {
"result_type" : "recent"
},
"to_user_id" : 87593058,
"text" : "@ncsomofriend about 100USD",
"id" : 13839071338,
"from_user_id" : 113120734,
"to_user" : "ncsomofriend",
"geo" : null,
"iso_language_code" : "en",
"source" : "<a href="http://twitter.com/">web</a>"
},
{
"profile_image_url" : "http://s.twimg.com/a/1273620457/images/default_profile_4_normal.png",
"created_at" : "Wed, 12 May 2010 08:07:45 +0000",
"from_user" : "thanhcongvo",
"metadata" : {
"result_type" : "recent"
},
"to_user_id" : 85458822,
"text" : "@ncsomo 100K okie?",
"id" : 13839034156,
"from_user_id" : 113120734,
"to_user" : "ncsomo",
"geo" : null,
"iso_language_code" : "lt",
"source" : "<a href="http://twitter.com/">web</a>"
}],
"max_id" : 13839071338,
"since_id" : 0,
"refresh_url" : "?since_id=13839071338&q=to%3Ancsomofriend+OR+to%3Ancsomo",
"results_per_page" : 15,
"page" : 1,
"completed_in" : 0.015984,
"query" : "to%3Ancsomofriend+OR+to%3Ancsomo"
}

Based on this result, we can see that the parser mis-join the data of the tweet results with the data of the query.
Am I right? Would you mind fixing this soon?

Issue when unfollowing

When I unfollow twitter returns a userInfo that I am still following the user I have just unfollowed.
The opposite (when I follow) works fine.
Any idea?

ps: when I refresh user info is correct. It is wrong only in the callback of the unfollow action.

Error when downloading Followers/Friends

Every time I use the recentlyUpdatedFriends I get an error in the console. I'm not yet using the data (although I have been on a previous version of MGTwitterEngine) and it seems to be coming from with the engine.

Any ideas?

name prop inside status on Twitter json response

I've received a response from [twitterEngine getFollowersIncludingCurrentStatus:YES] where the twitter user NAME prop was missing on the main JSON object but was available inside the status {} sub-object. This breaks the parser that tries to insert _user (which is nil) inside a dictionary. (line 66 of MGTwitterUsersYAJLParser.m).

The Copy below express that situation.

{
"contributors_enabled" = 0;
description = "";
favorited = 0;
"geo_enabled" = 0;
id = 13380853671;
"in_reply_to_screen_name" = ;
"in_reply_to_status_id" = ;
lang = en;
"profile_background_color" = 9ae4e8;
"profile_image_url" = "http://a1.twimg.com/profile_images/181419100/MathiasSouthPark_normal.jpg";
"source_api_request_type" = 12;
status = {
contributors = ;
"contributors_enabled" = 0;
coordinates = ;
"created_at" = 1246539539;
description = "";
"favourites_count" = 0;
"followers_count" = 51;
following = 0;
"friends_count" = 58;
geo = ;
"geo_enabled" = 0;
id = 53054965;
"in_reply_to_screen_name" = ;
"in_reply_to_user_id" = ;
lang = en;
location = "";
name = "Marcio Dolzan";
notifications = 0;
place = ;
"profile_background_color" = 1A1B1F;
"profile_background_image_url" = "http://a1.twimg.com/profile_background_images/79836346/twitter_bg_inter.jpg";
"profile_background_tile" = 0;
"profile_image_url" = "http://a3.twimg.com/profile_images/302023811/marcio_normal.JPG";
"profile_link_color" = 2FC2EF;
"profile_sidebar_border_color" = 181A1E;
"profile_sidebar_fill_color" = 252429;
"profile_text_color" = 666666;
protected = 0;
"screen_name" = marciodolzan;
source = web;
"statuses_count" = 137;
"time_zone" = Brasilia;
url = ;
"user_id" = 53054965;
"utc_offset" = -10800;
verified = 0;
};
text = "Cara, se isto aqui http://migre.me/BKUb for assim mesmo, acho que o Leandro Behs sentou no pat\U00ea.";
truncated = 0;
},

getUserInformationFor: Error with YAJL or TouchJSON

When using YAJL or TouchJSON, if getUserInformationFor: is called and the user returned has geolocation information associated with his most recent status, both MGTwitterUsersYAJLParser.m (line 66) and MGTwitterTouchJSONParser.m (line 135) throw an NSInvalidArgumentException because the object being inserted is nil.

I suspect they need to be rewritten in a similar fashion that MGTwitterStatusesYAJLParser was recently rewritten.

Issue when uploading profile image

Twaat[4255:207] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSArray objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** Call stack at first throw:
(
0 CoreFoundation 0x028dd919 exceptionPreprocess + 185
1 libobjc.A.dylib 0x02a2b5de objc_exception_throw + 47
2 CoreFoundation 0x028d358c -[__NSArrayI objectAtIndex:] + 236
3 Twaat 0x0001d906 -[NSMutableURLRequest(OAParameterAdditions) parameters] + 633
4 Twaat 0x0001f1e1 -[OAMutableURLRequest _signatureBaseString] + 38
5 Twaat 0x0001ed14 -[OAMutableURLRequest prepare] + 44
6 Twaat 0x000180a4 -[MGTwitterHTTPURLConnection initWithRequest:delegate:requestType:responseType:] + 29
7 Twaat 0x00012815 -[MGTwitterEngine _sendDataRequestWithMethod:path:queryParameters:filePath:body:requestType:responseType:] + 721
8 Twaat 0x0001554d -[MGTwitterEngine setProfileImageWithImageAtPath:] + 117
9 Twaat 0x0002106e -[FVTwaatAccountViewController updateProfile:] + 409
10 UIKit 0x00783e14 -[UIApplication sendAction:to:from:forEvent:] + 119
11 UIKit 0x0080d6c8 -[UIControl sendAction:to:forEvent:] + 67
12 UIKit 0x0080fb4a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
13 UIKit 0x0080e6f7 -[UIControl touchesEnded:withEvent:] + 458
14 UIKit 0x007a72ff -[UIWindow _sendTouchesForEvent:] + 567
15 UIKit 0x007891ec -[UIApplication sendEvent:] + 447
16 UIKit 0x0078dac4 _UIApplicationHandleEvent + 7495
17 GraphicsServices 0x03134afa PurpleEventCallback + 1578
18 CoreFoundation 0x028bedc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION
+ 52
19 CoreFoundation 0x0281f737 __CFRunLoopDoSource1 + 215
20 CoreFoundation 0x0281c9c3 __CFRunLoopRun + 979
21 CoreFoundation 0x0281c280 CFRunLoopRunSpecific + 208
22 CoreFoundation 0x0281c1a1 CFRunLoopRunInMode + 97
23 GraphicsServices 0x031332c8 GSEventRunModal + 217
24 GraphicsServices 0x0313338d GSEventRun + 115
25 UIKit 0x00791b58 UIApplicationMain + 1160
26 Twaat 0x0001d0f2 main + 85
27 Twaat 0x000021a5 start + 53
)

Expand Wiki with "getting started" information

The wiki could use a "getting started" page. Fresh clones of the project have gapping holes in them (yajl, TouchJSON to name two). People new to using the engine might be discouraged trying to find these things and set them up with no guidance, possibly to the point of discarding the project entirely.

1.1 Release

I'd like to get a new formal release of MGTwitterEngine together, ideally before WWDC (June 7) and absolutely before the full deprecation of Twitter basic auth (June 30). I'll set a target date of Saturday, May 28 for release. Bugs/features that should go in the release should be tagged with the 1.1 label.

Scope-wise, I personally would like to see this be mostly a maintenance release, coupled with the addition of OAuth. However, I'm open to considering new APIs (e.g. Twitter lists) for inclusion.

Compilation error with fresh checkout

Reported by henmue/#5:


I just wanted to try the current implementation (2010-05-03) but the project fails to compile. Or rather I fail to compile the project :o). Anyway, I added yajl, oauthconsumer and TouchJSON. Compiling results in the generic error "gcc-4.2 failed with exit code 1". Any hints?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.