Giter Site home page Giter Site logo

sttwitter's Issues

Update version 0.0.6 in cocoapods and fix timeout in master

Current version 0.0.6 in cocoapods should be updated because in master already fixed assertion call when method signRequest:isMediaUpload:oauthCallback: gets oauthNonce-> random32Characters:

NSString *randomString = [self randomString]; - somehow this returns not the result from class method randomstring it always less then 32 characters long (for ex. 174172792)
NSAssert([randomString length] >= 32, @"");

So when i call getUsersShowForUserID after login it always crashes.

Master version:
method getUsersShowForUserID:orScreenName:includeEntities:successBlock... now always returns error:
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0xfe5dc20 {NSErrorFailingURLStringKey=https://api.twitter.com/1.1/users/show.json?user_id=...&screen_name=...&include_entities=0, ... NSUnderlyingError=0xfea7810 "The request timed out."}
but in current 0.0.6 it works fine - maybe there was mistake in commit about changing timeout in requests. I'll check this later.
Thanks

getUsersSearchQuery does not work

Getting "Missing Query Parameters" error
Can be easily fixed by changing

md[@"query"] = [query st_stringByAddingRFC3986PercentEscapesUsingEncoding:NSUTF8StringEncoding];

to

md[@"q"] = [query st_stringByAddingRFC3986PercentEscapesUsingEncoding:NSUTF8StringEncoding];

Since the API requires 'q' for the search query and not 'query'

Large Photos Won't Upload

Sorry for opening so many issues!

For some reason uploading a large image takes forever. Smaller filesize images upload just fine, but it seems that uploading any image taken with an iPhone (so far) will not upload correctly. It'll either return a timeout error or sit there endlessly uploading. Any ideas?

By the way the STTwitterDateFormatter is great! Thanks for your work!

Private methods

what kind of authentication is needed for the private methods?

verifyCredentialsWithSuccessBlock: crashes on iOS 5 when no twitter user defined (and a potential fix)

First, thank you for the very useful library. :)
I just (probably) found a small bug.
This code (on a viewDidLoad, I was just starting):

    STTwitterAPI *twitter = [STTwitterAPI twitterAPIOSWithFirstAccount];
    [twitter verifyCredentialsWithSuccessBlock:^(NSString *username) {
        [twitter getUserTimelineWithScreenName:@"wfmu" successBlock:^(NSArray *statuses) {
            DLog(@"twitter success:\n%@", statuses);
        } errorBlock:^(NSError *error) {
            DLog(@"Twitter errror: %@", [error description]);
        }];
    } errorBlock:^(NSError *error) {
        NSLog(@"-- error: %@", error);
    }];

fails gracefully on iOS 6 (simulator) when no twitter users are defined with 'Error Domain=STTwitterOS Code=215 "Bad Authentication data" UserInfo=0x9fa1520 {NSLocalizedDescription=Bad Authentication data}' but crashes on iOS 5.1 (simulator, sorry no device handy to test on a real device)
Relevant stack trace follows:
#0 0x000d7b45 in -[STTwitterOS hasAccessToTwitter] at /Users/gt/Documents/dev/WFMU/Libs/STTwitter/STTwitterOS.m:57
#1 0x000d7bb2 in -[STTwitterOS verifyCredentialsWithSuccessBlock:errorBlock:] at /Users/gt/Documents/dev/WFMU/Libs/STTwitter/STTwitterOS.m:64
#2 0x000a5074 in -[STTwitterAPI verifyCredentialsWithSuccessBlock:errorBlock:] at /Users/gt/Documents/dev/WFMU/Libs/STTwitter/STTwitterAPI.m:134
#3 0x000e2b35 in -[WMTwitterViewController viewDidLoad] at /Users/gt/Documents/dev/WFMU/WFMU/WMTwitterViewController.m:32

That's (probably) because SLComposeViewController is an iOS 6+ API.

A quick workaround is to use [TWTweetComposeViewController canSendTweet] on STTwitter/STTwitterOS.m:57 to check access to twitter (you'll have to include Twitter/Twitter.h, of course). This fix avoid the crash, my code fails with 'Error Domain=STTwitterOS Code=0 "No Twitter Account is set up." UserInfo=0x8899e50 {NSLocalizedDescription=No Twitter Account is set up.}' that seems reasonable.

I just forked your code so it's reasonably up-to-date.

Again, thank you for your library... make me know if the fix is useful (and working). I'll make you know if I find more iOS5 problems (the app I'm working on requires iOS5 support).

Crash on iOS5 on STTwitterOS.m:100

The call to:
requestAccessToAccountsWithType:options:completion: is not available on iOS5.
It should be (probably) substituted with requestAccessToAccountsWithType:withCompletionHandler: (deprecated on iOS6).
I'm not sure to be able to patch it myself (not knowing the library) but it should be not so difficult).

(I made I run on STTwitter with DeployMate, a very useful tool, and apparently there are no other calls to methods not available on iOS5.1 not wrapped).

Integration with RestKit

Hi- I'm attempting to use this project with RestKit (http://restkit.org/) and wanted to get your opinion on the best way to do so. If you're not familiar with it, RestKit handles REST operations (but not Oauth) and provides for a layer on top of Core Data to handle direct JSON/RSS object mapping to NSManagedObjects, plus a lot of other things. Unfortunately, as I mentioned, it doesn't handle Oauth, so I was wondering if there was a way to only use the authentication header generated by STHTTPRequest and pass it as a string or NSURL to RestKit, which will then make the request and perform the mapping/Core Data operations?

I've dug around a little in the code, but haven't yet identified exactly in which method of STHTTPRequest the header gets formed (that seems like where it's happening). It could be a useful feature to have, if it doesn't exist already.

Thanks,
Evan

working via cellular

All works properly when connection established via wi-fi. But when connection is reachable only via cellular, can't send any request

Possible bug on GET lists/statuses

Something a little odd happening on "getListsStatusesForSlug:" When I specify an optional count it seems that the method is receiving three less tweets than specified. When I specify 50 tweets I receive 47, when I specify 100 I receive 97, and when I specify 103 I receive 100. Don't have a lot of time right now to dig into it, but wanted to bring it to your attention. A breakpoint on the method shows this on the success completion block's array (see attached).

screen shot 2013-07-01 at 10 11 06 pm

Release mode flag

Hello,

thanks for this great code. Actually using it for in house developments.

I'd just recommend you indicate in the README.md, it is necessary to have the flag:
-DNS_BLOCK_ASSERTIONS=1 in release mode.

Otherwise, the code can crash (silently) during authentication phase when using a private twitter account.

User denied access to twitter causes verifyCredentialsWithSuccessBlock to fail with nil error

[using STTwitterOS for access from the iOS system framework]

If the user denies the app access to their twitter account(s) in the system dialog box during verifyCredentialsWithSuccessBlock then the failure block is called with error == nil.

Suggested change is to expand the if(granted == NO) clause to something like:

        if(granted == NO) {
            NSString *message = @"Authentication failed: User rejected access to their twitter account(s)";
            NSError *error = [NSError errorWithDomain:NSStringFromClass([self class]) code:0 userInfo:@{NSLocalizedDescriptionKey : message}];
            errorBlock(error);
            return;
        }

ProgressBlock

I don't see how to "easily" use the progressBlock... it would be useful in the method to upload the image but seems not possible unless I use STHTTPRequest directly...

Podspec and Social.framework

Using STTwitter via CocoaPods results in the following line in the Pods.xcconfig file:

OTHER_LDFLAGS = -ObjC -framework Accounts -framework CoreGraphics -framework Foundation -framework QuartzCore -framework Social -framework Twitter -framework UIKit

And the Pods-STTwitter target has Social.framework in the Link Binary With Libraries build phase as a Required library.

The built app will not run on iOS 5. The debugger shows an error like this:

dyld: Library not loaded: /System/Library/Frameworks/Social.framework/Social
Referenced from: /var/mobile/Applications/353C9D18-DAAF-4492-B1A6-3D438384B88C/MyApp.app/My App
Reason: image not found

This error can be eliminated by changing the linker options and build phases so that Social.framework is weakly linked.

Is it possible to change the podspec so that Social.framework will be weakly linked?

Setting includeReplies to nil fails in user streams

I'm calling

[api getUserStreamDelimited:@NO stallWarnings:@YES includeMessagesFromFollowedAccounts:nil includeReplies:nil keywordsToTrack:nil locationBoundingBoxes:nil progressBlock:progressBlock stallWarningBlock:stallWarningBlock errorBlock:errorBlock];

and it returns a timeout error. I might be mistaken but isn't setting includeReplies to nil supposed to return only mutual follow replies as described in the Streaming API docs?

Turning off NSLog debugging

Very easy to use wrapper, but I can't seem to find a way to disable all the NSLogs (jsonError etc). I want to use the wrapper in a finished app so I'd prefer to stop its constant use of NSLog as it can cause frame issues. Any technique to block it, or any plans to make it possible to disable/enable? I've seen this done previously by doing

if(DEBUG) {...here's the NSLog....}

and then define DEBUG as true or false in a pch file.

How to login twitter without login prompt

In this demo every time I open the app I need to login from safari. Is it possible to stop so that I can login once and from next time I'll be able to auto login by using access token?

I have tried to logged in by calling this method

postAccessTokenRequestWithPIN:
                 successBlock:^(NSString *oauthToken, NSString *oauthTokenSecret, NSString *userID, NSString *screenName)
                   errorBlock:^(NSError *error)

but it gives error 93

How to authenticate user?

So after the user enters their username and password to the app, I use the [twitter verifyCredentialsWithSuccessBlock:^(NSString *username) {} code to verify the credentials.

I then use the following code to get the statuses and put them in the NSArray like the README says, and I call for a count of the array – to make sure they were loaded properly.

[twitter getHomeTimelineSinceID:nil
count:100
successBlock:^(NSArray *statuses) {

                               // Display them

                               NSLog(@"%i", [statuses count]);

                           } errorBlock:^(NSError *error) {

                               // Show "couldn't get statuses" alert

                           }];

However, in the console, I get something like this:

2013-08-10 10:38:15.313 [5989:c07] Unhandled authentication challenge type - NSURLAuthenticationMethodOAuth2
2013-08-10 10:38:15.314 [5989:c07] -- regexError: (null)
2013-08-10 10:38:15.314 [5989:c07] -- body: (null)

Thank you for your help in advance!

STTwitter Login Always

Hi,

I'm using STTwitter for just status updates, i can see the current SDK asks for login access everytime to tweet a status, how can i get rid of login ermission everytime tweeting..lemm know please

Performing Reverse OAuth Token Request on system

Dear

When i user STTwitter for reverse OAuth the first time system work fine and i got the related keys when i preform a new reverse OAuth the system crash in -(void)sessionCookies method and get EXE_BAD_ACCESS

can you kindly update us how to perform logout and clear active session

Profile Information

Dear, I have checked the issues posted by other users but I'm amazed that no one asked about fetching the profile information like facebook sdk

Can I know what is the method that I need to use to fetch the profile information of twitter account through which i have logged along with its profile image?

TwitterAPI

Edit:

It seems I do need xAuth for this. In the meantime I will try to use the PIN verification by looking through the source for the appropriate methods. Could you update the readme with more information on how to do this in a UIWebView?


Hi, what is Consumer Name in the call

STTwitterAPI *twitter = [STTwitterAPI twitterAPIWithOAuthConsumerName:@""
consumerKey:@""
consumerSecret:@""
username:@""
password:@""];

I tried using my application name for the consumerName, my twitter-issued developer key & secret and my own personal username and password to test, but I get the dreaded 215 Bad Authentication back. Twitter's developer page doesn't mention anything about consumer name. Is this something I need to apply for?

Thanks

// TODO: handle progressBlock?

So I'm experimenting with your STTwitter framework (in Xcode 5), specifically the code you posted in this answer:

http://stackoverflow.com/a/15419005/1228669

I have my own API Concumer key and secrets and I appear to be getting a valid response, but this block of code seems to be throwing an EXC_BAD_ACCESS error:

- (void)getResource:(NSString *)resource
      baseURLString:(NSString *)baseURLString
         parameters:(NSDictionary *)parameters
      progressBlock:(void(^)(id json))progressBlock
       successBlock:(void(^)(NSDictionary *rateLimits, id json))successBlock
         errorBlock:(void(^)(NSError *error))errorBlock {

    [_oauth fetchResource:resource
               HTTPMethod:@"GET"
            baseURLString:baseURLString
               parameters:parameters
            progressBlock:^(NSString *requestID, id response) {
                progressBlock(response);
            } successBlock:^(NSString *requestID, NSDictionary *rateLimits, id response) {
                successBlock(rateLimits, response);
            } errorBlock:^(NSString *requestID, NSError *error) {
                errorBlock(error);
            }];
}

Specifically on this line:

                progressBlock(response);

When I "po response" I appear to be getting a valid NSArray (typed as __NSCFArray) with JSON seemingly valid JSON data in it.

So I started digging around and noticed you had left a TODO comment about the whole progressBlock bit. Can you give me any tips on where I could dig next?

Thanks!

Warning while compiling for archive (iOS, Xcode 5.x)

I get a warning while archiving at

STTwitter/STTwitterAPI.m:912:18: warning: unused variable 'validValues' [-Wunused-variable]
    NSArray *validValues = @[@"left", @"right", @"center", @"none"];
             ^
1 warning generated.

This can be silenced (with hopefully no side effects) by changing the offending line from:

        NSArray *validValues = @[@"left", @"right", @"center", @"none"];

to

        NSArray __unused *validValues = @[@"left", @"right", @"center", @"none"];

Thank you for your library! :)

search tweets and store the results

I'm using the code as follows for getting the tweets with the respective search strings but it's not working

- (IBAction)searchButton:(id)sender
{
    [self.view endEditing:YES];
    NSString *searchString = self.searchField.text;
    [_twitter getSearchTweetsWithQuery:searchString successBlock:^(NSDictionary *searchMetadata, NSArray *statuses)
     {
         NSLog(@"Tweets for search field are : %@", [searchMetadata description]);
         self.tweetDictionary = searchMetadata;
         self.tweets = statuses;
         NSLog(@"tweets status array : %@", statuses);
         [self.tableView reloadData];
     }
    errorBlock:^(NSError *error)
     {
         NSLog(@"Oops! : %@", error);
     }];
}

it's not producing any logs and also i have checked it with breakpoint's the function's are not called need help please.

Framework and/or ARC

I'd like to use STTwitter in a project that uses ARC. Copying the STTwitter folder is problematic because the code doesn't use ARC. As I understand it, if STTwitter was packaged into a framework it would work fine with ARC projects. Are there any plans to add a framework target or migrate to ARC?

Thanks..

Need to be able to specify more search parameters

In short, I'd like to be able to pass the entire dictionary for search. I don't know what the proper etiquette is here on github. I could fork and make the changes myself, though I'm thinking that it would be best (for me) if I didn't have to maintain that.

getSearchTweetsWithParameters:(NSDictionary *) searchParams ...

What do you think?

Thread safety for OSX

Hello!

I was wondering if you can change the declared properties from nonatomic to NS_NONATOMIC_IOSONLY, in order to make the code better rigged for threads in OSX environment?

I could make the changes and issue a pull request, if that works for you.

Thanks,

Count returning incorrect quantity of tweets

I am currently getting some rather odd behaviour with setting the 'count' parameter on a user timeline fetch.

As an example, take the following:

    if ([self.tweetFetchMode isEqualToString:@"localUser"]){
        //NSLog(@"Fetching Logged In User Timeline");
        [_twitter getHomeTimelineSinceID:nil count:5 successBlock:^(NSArray *statuses) {
            NSLog(@"Fetching %ld tweets", (long)[self.tweetsToFetchOutlet integerValue]);
            // Get Statuses from method
            self.timelineStatuses = statuses;

            //Set the OK message, everythign went okj
            self.twitterGetTimelineStatus = @"OK";

            //Temporariyl log the timeline statuses
            //NSLog(@"Getting Timeline Tweets: %@", self.twitterGetTimelineStatus);

            [self processNewTweets:self.timelineStatuses];

        } errorBlock:^(NSError *error) {
            self.twitterGetTimelineStatus = error ? [error localizedDescription] : @"Unknown error";
        }];

Despite specifying a count of 5, this returns 20 objects.

How if i change the value from anything from 1-4 then the correct value is returned, then anything above 5 returns a multiple of the specified count.

I'm guessing this has something to do with the code in the library that repeats the fetch if the count quantity wasn't met, but i'm unsure how to rectify it.

Help appreciated!

Thanks

Gareth

Twitter Feed for 1 account only `

I am creating this app where I want to show his Twitter feed. But I want it so it is only his and not the users. Is there a way to do that with this?

Cookie Deleted

It deletes all the cookies in the NSHTTPCookieStorage, including the cookies that are used in other parts of the app

Compiling STTwitter

I have created a app that does the same task on Android but this is my first Iphone app & I am pulling out my hair here. I am learning as I go. All I want to do is show a public tweet in the app. I can not get the project to compile with STTwitter.

It's got a bunch of errors and I have no clue what's going on.

compileerror

I am using xcode 4.2 with OS 10.6.8

I have been trying for over 30+hours, please help.

Revers Auth: postReverseOAuthTokenRequest success AND error blocks called at same time

I am using the code below to perform Twitter reverse auth.

The really strange behaviour is that both the postReverseOAuthTokenRequest success AND errorBlock blocks are called.

The logged sequence is this:


THE ERROR BLOCK IS CALLED:
12:09:08.284 | info | Main thread | Twitter reverse auth request failed. Error returned was: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Invalid value around character 0.) UserInfo=0x145f9910 {NSDebugDescription=Invalid value around character 0.} 

THE SUCCESS BLOCK IS CALLED:
12:09:08.303 | info | Main thread | Twitter.postReverseOAuthTokenRequest: OAuth oauth_signature="***REDACTED***", oauth_consumer_key="***REDACTED***", oauth_signature_method="HMAC-SHA1", oauth_token="***REDACTED***", oauth_nonce="***REDACTED***", oauth_version="1.0", oauth_timestamp="1383822548"

This is the complete code:

-(void) twitterLoginWithAccount:(ACAccount *)acct
{
    STTwitterAPI *twitter = [STTwitterAPI twitterAPIWithOAuthConsumerName:nil
                                                              consumerKey:TWITTER_CONSUMER_KEY
                                                           consumerSecret:TWITTER_CONSUMER_SECRET];

    [twitter postReverseOAuthTokenRequest:^(NSString *authenticationHeader) {
        SVLOG1_INFO(@"Twitter.postReverseOAuthTokenRequest: %@", authenticationHeader);
        STTwitterAPI *twitterAPIOS = [STTwitterAPI twitterAPIOSWithAccount:acct];
        [twitterAPIOS verifyCredentialsWithSuccessBlock:^(NSString *username) {
            [twitterAPIOS postReverseAuthAccessTokenWithAuthenticationHeader:authenticationHeader
                                                                successBlock:^(NSString *oAuthToken, NSString *oAuthTokenSecret, NSString *userID, NSString *screenName) {
                                                                    SVLOG1_INFO(@"Twitter reverse auth process succeded.");
                                                                    [[SVDataManager sharedInstance] registerTwitterUserWithToken:oAuthToken
                                                                                                                       andSecret:oAuthTokenSecret
                                                                                                                   andIdentifier:userID
                                                                                                                         andName:screenName
                                                                     ];

                                                                } errorBlock:^(NSError *error) {
                                                                    SVLOG1_INFO(@"Twitter reverse auth process failed. Error returned was: %@\n", [error description]);
                                                                    [self twitterLoginFailed:@"Twitter authentication error."];
                                                                }];
        } errorBlock:^(NSError *error) {
            SVLOG1_INFO(@"Twitter verify credentials failed. Error returned was: %@\n", [error description]);
            [self twitterLoginFailed:@"Twitter authentication error."];
        }];
    } errorBlock:^(NSError *error) {
        SVLOG1_INFO(@"Twitter reverse auth request failed. Error returned was: %@\n", [error description]);
        [self twitterLoginFailed:@"Twitter authentication error."];
    }];
}

Any idea.

Anyway, thanks for the great library!
Alessandro

Direct Messaging problem

Hello,

First of all thank you very much for writing such a nice library :)

I have developed a ios app using "STTwitter". My app has following functionalities

  1. Get all recent direct messages of user
  2. User can Delete his direct messages
  3. User can send new direct message to any of his follower
  4. Private chat with any follower (direct message chat)

So as per my understanding i have to use "xAuth" for getting user direct messages, delete direct messages and send new direct messages and etc. I have submitted the request to Twitter for approval of my twiiter app for "xAuth"

My submitted Request to twitter
"I am developing the application that has to access users direct messages, get recent direct messages, send direct messages to followers, remove direct messages and etc. So i need a xAuth access for these functionalities."

So after few days they replied like

Twitter Reply
"Thank you for writing in. We have reviewed the information you have provided and believe that a different authentication method may better suit your application's needs. "

So please guide me what should I do in this situation, i have to have report for development progress to client so please help me out.

A quick response will be appreciated.

Email Id :: [email protected]

Thanks

Wrong success block

Some methods like getListsSubscribersForSlug has a wrong success block without any parameter passed, it's easy to fix but I wanted to report to you

getSearchTweetsWithQueryDictionary

Thanks Nicolas for your work.

I used Twitter api 1.0 with "search.json?q=xx?rpp=yy" and now with "q=xx?count=yy"

Perhaps is interesting to add a method with NSDictionary parameter to manage count:

  • (void)getSearchTweetsWithQueryDictionary:(NSDictionary *)search
    successBlock:(void(^)(NSDictionary *searchMetadata, NSArray *statuses))successBlock
    errorBlock:(void(^)(NSError *error))errorBlock
    {
    [_oauth getResource:@"search/tweets.json" parameters:search successBlock:^(id response) {

    NSDictionary *searchMetadata = [response valueForKey:@"search_metadata"];
    NSArray *statuses = [response valueForKey:@"statuses"];
    
    successBlock(searchMetadata, statuses);
    

    } errorBlock:^(NSError *error) {
    errorBlock(error);
    }];

}

Thanks
Miguel

Alert Not getting popped up why?

Dear,
I have tested the application when I have the twitter account setup on iphone settings and access to twitter account details it fetches smooth.
But the problem is when I don't have any account in iPhone settings it returns log message but no pop up
debugger logs with this message

"This system cannot access Twitter" 

and when I test it on iPhone Device I get

 warning in console 
��Jan  6 16:19:28 Iphone 360SA[517] <Warning>: No Twitter account available.
��Jan  6 16:19:29 Iphone 360SA[517] <Warning>: Trying to login with iOS...

The code is here in STTwitterOS.m file in method

- (void)verifyCredentialsWithSuccessBlock:(void(^)(NSString *username))successBlock errorBlock:(void(^)(NSError *error))errorBlock {
if([self hasAccessToTwitter] == NO) {
        NSString *message = @"This system cannot access Twitter.";
        NSError *error = [NSError errorWithDomain:NSStringFromClass([self class]) code:STTwitterOSSystemCannotAccessTwitter userInfo:@{NSLocalizedDescriptionKey : message}];
        errorBlock(error);
        return;
    }
   if(self.account == nil) {
                NSArray *accounts = [self.accountStore accountsWithAccountType:accountType];

                if([accounts count] == 0) {
                    NSString *message = @"No Twitter account available.";
                    NSError *error = [NSError errorWithDomain:NSStringFromClass([self class]) code:STTwitterOSNoTwitterAccountIsAvailable userInfo:@{NSLocalizedDescriptionKey : message}];
                    errorBlock(error);
                    return;
                }

                self.account = [accounts objectAtIndex:0];
            }

Is it something that I need to do anything for popping up the alertview? or is it something need to be done in this file?

Adding GET lists/statuses implementation

Hi, I wanted to add GET lists/statuses implementation to STTwitterAPIWrapper and have created methods to do so using either the list ID or the list slug and owner screen name. My question is regarding the method - (void)getTimeline. I'm wondering if it should still stay named "getTimeline" if it can be used to retrieve other resources, such as a list? In my code, I just called this method instead of duplicating it and creating another method called "getList."

So, first, is it ok to use the existing getTimeline method for this (it works fine with my code) and, if so, should it be possibly renamed to something not so confining, such as "getResource," since it's not retrieving a timeline in this case? I do see that STTwitterAppOnly has a "getResource" method, so I don't know if you think that might be too confusing.

When you get a chance to answer this, I can then submit a pull request.

Thanks,
Evan

Saved searches

The method getSavedSearchesListWithSuccessBlock should use getAPIResource (HTTP Method should be GET according to Twitter's 1.1 API) rather than postAPIResource, otherwise you get a "Can't authorize you" error. Similar issue with the getSavedSearchesShow method.

Twitter Feed for 1 account only `

I am creating this app where I want to show his Twitter feed. But I want it so it is only his and not the users. Is there a way to do that with this?

[__NSCFDictionary dataUsingEncoding:]: unrecognized selector sent to instance

  • (void)verifyCredentialsWithSuccessBlock:(void(^)(NSString *username))successBlock
    errorBlock:(void(^)(NSError *error))errorBlock {

    [self postResource:@"oauth2/token"
    baseURLString:@"https://api.twitter.com"
    parameters:@{ @"grant_type" : @"client_credentials" }
    useBasicAuth:YES
    successBlock:^(NSString *body) {

          NSData *data = [body dataUsingEncoding:NSUTF8StringEncoding];
    

What files to add to project?

What files do I need to import into my project? The whole STTwitter-master folder? The STTwitter folder inside of that? The Xcode project?

Currently I tried importing the The STTwitter folder inside of the master folder, on build I am getting autorelease errors.

Can anyone help me?

CocoaPods compatibility

Hi,

I was going to use STTwitter in a project that I've already set up with CocoaPods (http://cocoapods.org/) and noticed that you don't have a pod set up, so I went ahead and created a podspec for it. I have it hosted as a private gist currently, but if you have interest in making STTwitter available as a pod for everyone to use I can submit it to CocoaPods and they would host the podspec file. That way, it'd be as easy as including 'pod STTwitter' in a project using CocoaPods to utilize it.

Here's the gist, it's only really missing any additional author(s) besides yourself (as well as email addresses, if you want them included), and supported OS X versions:

https://gist.github.com/eroth/573f80056acf53f4dbca/raw/9ef10dc0ff4dd54ba81e3c3110ca6a44a57971f6/STTwitter.podspec

Cheers!

Compile fails, even on clean Project

I have imported the STTwitter folder (the one containing the header and implementation files, rather than the root one that also contains the demo projects e.t.c) and added the -fno-objc-arc flag to the 7 .m files under Build Phases, but every time i try to build the project it fails with following errors:

Undefined symbols for architecture x86_64:
"_ACAccountStoreDidChangeNotification", referenced from:
-[STTwitterAPIWrapper init] in STTwitterAPIWrapper.o
"_ACAccountTypeIdentifierTwitter", referenced from:
-[STTwitterOAuthOSX username] in STTwitterOAuthOSX.o
-[STTwitterOAuthOSX requestAccessWithCompletionBlock:errorBlock:] in STTwitterOAuthOSX.o
"OBJC_CLASS$_ACAccountStore", referenced from:
objc-class-ref in STTwitterOAuthOSX.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm a little at a loss as to what is going on, i have created a completely fresh XCode project and the same errors occur. Annoyingly if open the demo XCode project, that compiles fine!

Help please :)

Thanks!

Gareth

OAuth - XAuth Login does not work

In Mac demo project, if I try to login with user name and password, I receive the following error:

The operation couldn’t be completed. (STHTTPRequest error 401.)

Problem with License file using CocoaPods

Hello!
Installing the version 0.0.5 via CocoaPods, I got this error message:

[!] Unable to read the license file `/directory/Used/For/My/Project/Pods/STTwitter/LICENCE.txt` for the spec `STTwitter (0.0.5)`

Create (tag) a new release

Was wondering if you'd want to create a new release so people using Cocoapods can pull in the latest changes. All you'd have to do is create a new tag and I can submit a new podspec to the Cocoapods podspec repo.

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.