Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

How do I link to the Facebook app from my website on mobile devices?

I've searched online and found that using the url: fb://pages/"pageid" instead of http://www.facebook.com/pageid does the job partially.

When I click the fb;//pages/"pageid" url on desktop, Chrome announces:

Google Chrome needs to launch an external application to handle fb: links. The link requested is fb://page/"pageid".

The following application will be launched if you accept this request:

AddressBookUrlForwarder

Basically, it doesn't lead to Facebook on desktop. On mobile it works just fine.

Any solutions?

Thanks for you help!

I'm not certain, but I think doing an in-line media query for max/min width that distinguishes between mobile device and desktop pc could solve your problem.

You could also do two separate anchors/links in your html and do a media query with css rule to "display: none;" for the link you do not want displayed based on results of media query for screen size.

1 Answer

Hi Julian, see if this solution helps out.