Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch Facebook app from my app and make it open a profile which is not mine

I am working on an app where I need to put a button that will redirect users to a certain Facebook page. Normally tapping on this button should open the profile in the Facebook app or in the navigator if Facebook is not installed. Plus I would like to do the same thing with a twitter page.

I would like like to know how to do that.

like image 629
Zak001 Avatar asked Oct 21 '11 18:10

Zak001


People also ask

How do I find out what Apps are connected to my Facebook?

Tap in the top right of Facebook. Scroll down and tap Settings. Tap Apps and Websites, then tap Logged in with Facebook. Tap on the name of the app.

What is a Facebook app ID?

A Facebook App ID is a unique number that identifies your app when you request ads from Audience Network. Each app on Audience Network must have a unique Facebook App ID. You may already have an App ID if your app uses Facebook Login or Facebook Analytics for Apps.


1 Answers

It all comes down to the custom url schemes. Facbook's is fb:// so if you were to open fb://profile/zuck Mobile Safari would kick you over to the Facebook app and load Mark Zuckerbergs profile page. There currently is a bug in the new Facebook app preventing it from loading profiles correctly.

To check if the user's device can respond to a URL scheme check out this post.

EDIT::

As far as Twitter you may want to check for a few different Twitter clients like twitter:// or tweetbot:// before kicking the user over to https://twitter.com/#!/<# User Name #>

like image 83
SkylarSch Avatar answered Sep 27 '22 22:09

SkylarSch