Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:05:07+00:00 2026-05-27T06:05:07+00:00

I was using some of Apple’s example code to write the Twitter integration for

  • 0

I was using some of Apple’s example code to write the Twitter integration for my app.

However, I get a whopping amount of errors (mostly being Semantic and parse errors).

How can this be solved?

  -(IBAction)TWButton:(id)sender {
ACAccountStore *accountstore = [[ACAccountStore alloc] init];
//Make sure to retrive twitter accounts
ACAccountType *accountType = [accountstore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[accountstore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) {
    if (granted) [{
        NSArray *accountsArray = [accountstore accountsWithAccountType:accountType];
    if ([accountsArray count] > 0) {
 ACAccount *twitterAccount = [accountsArray objectAtIndex:0];

            TWRequest *postRequest = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"http://api.twitter.com/1/statuses/update.json"]  parameters:[NSDictionary dictionaryWithObject:[@"Tweeted from iBrowser" forKey:@"status"] requestMethod:TWRequestMethodPOST];

            [postRequest setAccount:twitterAccount];

            [postRequest preformRequestWithHandeler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
                NSString *output = [NSString stringWithFormat:@"HTTP response status: %i", [urlResponse statusCode]];
                [self preformSelectorOnMainThread:@selector(displaytext:) withObject:output waitUntilDone:NO];
            }];

        }
    }];
}
 //Now lets see if we can actually tweet

 -(void)canTweetStatus {
     if ([TWTweetComposeViewController canSendTweet]) {
         self.TWButton.enabled = YES
         self.TWButton.alpha = 1.0f;
     }else{
         self.TWButton.enabled = NO
         self.TWButton.alpha = 0.5f;
     }



}

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:05:08+00:00Added an answer on May 27, 2026 at 6:05 am

    The first error I see is easy to get rid of.

    Objective C convention is to make the first letters of each method name lower case.

    Use makeKeyAndVisible in your AppDelegate.m

    The other errors we’d probably need to see where (in your code) the errors are being thrown, not just what kind of errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I considered using Apple's GLPaint example (http://developer.apple.com/library/ios/#samplecode/GLPaint) to do some finger painting. However, I
I am using some code which was originally taken from the Apple sample ViewTransitions
I am using the glImageProcessing example from Apple to perform some filter operations on.
I was looking into using some .NET code from within a Delphi program, I
I've had some trouble finding information about Apple's policies regarding in-app ads. I'm interested
Apple just released some sample code on lazy loading images in a UITableView a
I am using Urban Airship and Apple to delivery push notification. There are some
I'm trying to do some image processing on iPhone. I'm using http://developer.apple.com/library/ios/#qa/qa2010/qa1702.html to capture
While perusing some Apple Header files, I notice that they declare multiple interfaces using
I'm using this slider: http://tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/ and just want to add some text to each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.