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

  • SEARCH
  • Home
  • 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 8540385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:35:09+00:00 2026-06-11T11:35:09+00:00

I’m pretty sure an hour after I post this I may find the answer

  • 0

I’m pretty sure an hour after I post this I may find the answer but I’ve been looking for over an hour already and can’t seem to work it out. So here goes..

I’d like to put some simple “Contact Us” links in to my app which opens my profile in one of these twitter apps if available …. “Twitter”, “Tweetbot”, “Twitterriffic”, or Facebook falling back to Safari if none are available. I don’t wish to add a full API for twitter etc, as its merely a contact page, I have no need to access their time lines, or know their user ID’s etc.

The Tweetbot APP and handler which I use on my phone works fine (see below) and opens my Profile Page, however I can’t seem to get the default Facebook or Twitter app’s work, the applications launch but don’t got to my respective profile page (I’ve obviously left out the testing code but these are the lines which call the applications) ….

//Twitter
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://twitter.com/MyTwitterID"]];

//Tweetbot - WORKS!
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetbot:///user_profile/MyTwitterID"]];

//Fall Back to Safari - WORKS!
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.twitter.com/MyTwitterID"]];

//Facebook 
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://profile/MyFbID"]];

Now I got a fair bit of information here , but am unable to get it working apart from for Tweetbot and Safari. I’m guessing the URL part is in the wrong format, but I can’t find anywhere that explains how it should be. Google searching brings up pages with twitter and facebook tags but no helpful information, and the Twitter API documentation is far too detailed for the simple implementation I want to do. Can anyone help me with the right URL formats?


[EDIT] Took me more than an hour but here it is for Twitter at least ..

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=MyTwitterID"]];

Still working on the Facebook one!! Can’t take credit for the answer though I stumbled across it here

When I get the Facebook one working too I’ll post my code here with all the bits in case it helps someone else!

Plasma


EDIT 2: Ok here is my code (I’ve removed my website URL and also my facebook ID’s but you’ll get the idea …. It pops a UI Action Sheet with the Contact Us options.. Hope its of use to someone else.

#pragma mark - Contact Us Methods
- (IBAction)openContact {   

    UIActionSheet *popupContact = [[UIActionSheet alloc] initWithTitle:@"Contact Us" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Twitter", @"Facebook", @"Email", @"Visit our website", nil];

    popupContact.actionSheetStyle = UIActionSheetStyleDefault;

    [popupContact showInView:self.parentViewController.tabBarController.view];

}

-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {

    NSString *twitterUserName  = @"MyTwitterName";

    //Facebook ID (not the page name) check the FB urls for id=XXXXXXXXXXXXXXXX
    NSString *facebookUserID = @"XXXXXXXXXXXXXXX";


    UIApplication *app = [UIApplication sharedApplication];

    switch(buttonIndex){
        case 0: {
            //Contact Us By Twitter 

            //Twitter Default
            NSURL *twitterURL = [NSURL URLWithString:[NSString stringWithFormat:@"twitter://user?screen_name=%@", twitterUserName]];
            if ([app canOpenURL:twitterURL]) 
            {
                [app openURL:twitterURL];
                return;
            }

            //Tweetbot 
            NSURL *tweetbotURL = [NSURL URLWithString:[NSString stringWithFormat:@"tweetbot:///user_profile/%@", twitterUserName]];
            if ([app canOpenURL:tweetbotURL]) 
            {
                [app openURL:tweetbotURL];
                return;
            }

            // Tweetie: http://developer.atebits.com/tweetie-iphone/protocol-reference/
            NSURL *tweetieURL = [NSURL URLWithString:[NSString stringWithFormat:@"tweetie://user?screen_name=%@", twitterUserName]];
            if ([app canOpenURL:tweetieURL])
            {
                [app openURL:tweetieURL];
                return;
            }

            // Birdfeed: http://birdfeed.tumblr.com/post/172994970/url-scheme
            NSURL *birdfeedURL = [NSURL URLWithString:[NSString stringWithFormat:@"x-birdfeed://user?screen_name=%@", twitterUserName]];
            if ([app canOpenURL:birdfeedURL])
            {
                [app openURL:birdfeedURL];
                return;
            }

            // Twittelator: http://www.stone.com/Twittelator/Twittelator_API.html
            NSURL *twittelatorURL = [NSURL URLWithString:[NSString stringWithFormat:@"twit:///user?screen_name=%@", twitterUserName]];
            if ([app canOpenURL:twittelatorURL])
            {
                [app openURL:twittelatorURL];
                return;
            }

            // Icebird: http://icebirdapp.com/developerdocumentation/
            NSURL *icebirdURL = [NSURL URLWithString:[NSString stringWithFormat:@"icebird://user?screen_name=%@", twitterUserName]];
            if ([app canOpenURL:icebirdURL])
            {
                [app openURL:icebirdURL];
                return;
            }

            // Fluttr: no docs
            NSURL *fluttrURL = [NSURL URLWithString:[NSString stringWithFormat:@"fluttr://user/%@", twitterUserName]];
            if ([app canOpenURL:fluttrURL])
            {
                [app openURL:fluttrURL];
                return;
            }

            // SimplyTweet: http://motionobj.com/blog/url-schemes-in-simplytweet-23
            NSURL *simplytweetURL = [NSURL URLWithString:[NSString stringWithFormat:@"simplytweet:?link=http://twitter.com/%@", twitterUserName]];
            if ([app canOpenURL:simplytweetURL])
            {
                [app openURL:simplytweetURL];
                return;
            }

            // Tweetings: http://tweetings.net/iphone/scheme.html
            NSURL *tweetingsURL = [NSURL URLWithString:[NSString stringWithFormat:@"tweetings:///user?screen_name=%@", twitterUserName]];
            if ([app canOpenURL:tweetingsURL])
            {
                [app openURL:tweetingsURL];
                return;
            }

            // Echofon: http://echofon.com/twitter/iphone/guide.html
            NSURL *echofonURL = [NSURL URLWithString:[NSString stringWithFormat:@"echofon:///user_timeline?%@", twitterUserName]];
            if ([app canOpenURL:echofonURL])
            {
                [app openURL:echofonURL];
                return;
            }

            // --- Fallback: Mobile Twitter in Safari
            NSURL *safariURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://mobile.twitter.com/%@", twitterUserName]];
            [app openURL:safariURL];
            return;

        }
        case 1: {
            //Facebook
            NSURL *facebookURL = [NSURL URLWithString:[NSString stringWithFormat:@"fb://profile/%@", facebookUserID]];
            if ([app canOpenURL:facebookURL]) 
            {
                [app openURL:facebookURL];
                return;
            }

            // --- Fallback: Mobile Facebook in Safari
            NSURL *safariURL = [NSURL URLWithString:@"https://touch.facebook.com/MyFBName"];
            [app openURL:safariURL];
            return;

        }
        case 2:
            //Email           
            [app openURL:[NSURL URLWithString:@"mailto://support@mywebsite.co.uk?subject=Important%20Email&body="]];
            return;


        case 3:
            //Visit The Website
            [app openURL:[NSURL URLWithString:@"http://www.mywebsite.co.uk"]];
            return;

        case 4:
            //Cancel
            return;

    } 

}
  • 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-06-11T11:35:10+00:00Added an answer on June 11, 2026 at 11:35 am

    See Edit 2 on first post this is the complete solution.

    Plasma

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.