Marc P
Marc P

Reputation: 586

Facebook: Share URL from mobile browser to Facebook app

I have a blog where each article can be referred with the standard FB share url. When the user clicks to share that url it redirects them to the Facebook website where they make their final share commitment. This is great for the desktop experience where users generally are already logged into their computers.

However, if a user is on their mobile device, they're more likely to be logged into their mobile app rather than mobile browser, and I'd like to take advantage of this: Is there a method to forward users to their mobile FB app when they share a url?

Upvotes: 2

Views: 1456

Answers (1)

Jesse Chen
Jesse Chen

Reputation: 4928

You can use Android intents, by doing this.

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_TEXT, "http://www.url.com");
startActivity(Intent.createChooser(i, "Share URL"));

Selecting Facebook from the chooser will prepopulate the post with the URL and the user can write a message and share the url from the native Facebook app.

Upvotes: 1

Related Questions