I'm writing a PHP application that will serve as a Facebook Tab inside of a Page. In the application, the user has the option to Share a photo, be it on Facebook or as a link to put on other websites. The part with Facebook is easy, but my question is this.
How can I give someone a link to a page inside of a Facebook Tab?
For example, the direct url from which the tab loads the website is: http://my-site.com/tab
Inside of that website I have an url that looks like http://my-site.com/tab/photo.php?id=3
The url of the Facebook Tab is something like http://facebook.com/my-page/app_3932734623842
What I want is for the user to be able to paste a link on their twitter which would lead them directly to the page http://my-site.com/tab/photo.php?id=3 inside of the Facebook app.
Possible? How? :(
Thank you!
Related
i got a problem here. On my site i have a facebook share button, but it sends a link with some get variables. So im guessing facebook just handles these as $_GET['blabla'] but i want that link to be shared.
Currently the link to be shared is:
http://www.EXAMPLE.com/wptest/?page_id=38&vodid=1&t=152
so the link is:
http://www.facebook.com/sharer/sharer.php?s=100&p[url]=www.EXAMPLE.com/wptest/?page_id=38&vodid=1&t=152
But facebook only shares:
http://www.EXAMPLE.com/wptest/?page_id=38
how to i get my url so facebook (and other sites) treat the whole thing as a link instead of just filling the get array?
What you should do is URL encode the link before going to the sharer.php link, so the link you should use is:
http://www.facebook.com/sharer/sharer.php?s=100&u=http%3A%2F%2Fwww.example.com%2Fwptest%2F%3Fpage_id%3D38%26vodid%3D1%26t%3D152
i.e.
http://www.example.com/wptest/?page_id=38&vodid=1&t=152 becomes http%3A%2F%2Fwww.example.com%2Fwptest%2F%3Fpage_id%3D38%26vodid%3D1%26t%3D152
If you look at the above example, you'll see that the Facebook Sharer page will correctly display the URL in the dialog:
We want to manage a facebook page using php/mysql and php-facebook-sdk, we have a site with the sections below: About Us , Services, Projects, Contact Us.Each section contains data. We want to add programmatically a tabs sections called About Us , Services, Projects, Contact Us in the Facebook page related included a links to the site. We understand the creation of application on Facebook first, but the question is how proceed to use the facebook php-sdk or api's(graph api) related to do that? or any tutorials exist for this reason?how proceed to add new tabs with titles, and add data using php/mysql with this data?
We want to do exactly like the tabs in the page below:
https://www.facebook.com/doreuk
(About Dore, Contact us,....)
Thank you for your suggestions...
A facebook tab is a page on your (own) server framed in by facebook. So create a html page, make it available under http and https. Next follow the instruction in this tutorial:
https://developers.facebook.com/docs/appsonfacebook/pagetabs/
create your page
create a new app developers.facebook.com
choose page tab
install your app by visting: https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL
You don't need to use the facebook php-sdk or api's(graph api) to do this!
I've seem to have run into an issue here.
I have a voting/gallery app on a Tab of a specific page on Facebook.
So to provide a user with a direct link to a image in a Gallery(in the Paget Tab App), i generated a URL with APP_DATA, so I can pass data(image filename)to the iframe.
So basically my links look kinda like this:
https://www.facebook.com/pages/xxxxxx/xxxxxxxxx?sk=app_xxxxxxx&app_data=showimage.php%3Ffilename%3D1336314789stevakralj%2Ejpg
Now, when I try to create a Like button for this Link, I get nothing.
Any ideas?
I have exactly the same problem... In my app, which is hosted by a page tab, the "Like" buttons for each item apper correctly and the "data-href" attribute for each "like" button has the same format as yours, but EVERY like button points to the Facebook page which hosts the app, not to the individual item... so, for every item in my gallery, the "like" information under it is exactly the same (number of likes for the page hosting the app) and if I "dislike" any item, I "dislike" the entire page.
I have tried the same format but the parameter NOT on a facebook page... then it works... I don't see a difference but:
https://www.facebook.com/pages/xxxxxx/xxxxxxxxx?sk=app_xxxxxxx&app_data=abc (DOESN'T WORK, for each item which have app_data different)
https://www.mytestweb.com/test.aspx?sk=app_xxxxxxx&app_data=abc (WORKS for each item which have app_data different)
Facebook doesn't seem to allow linking directly to a tab page so strips your app ID from the URL. There's no way to get around this except by linking to an external site that bounces back to Facebook.
I'm trying to make a fanpage with the name and company of those who visit using PHP.
I managed to program it and add it to my page. But only appears if you have already added the the app before you visit.
I need to order installation of the app when the user enters the page.
how can i do this?
page http://www.facebook.com/pages/RMG-Direct/101016389955224?sk=app_246899652058808
This stumped me for a while too when the made some changes back in December I believe. One solution I found helped me was to make a link on the page which creates a popup that lets you add the tab to a page.
<a href="#" onclick=window.open("http://www.facebook.com/dialog/pagetab?app_id=YOUR APP ID HERE&next=YOUR APPS URL HERE","PageTab","width=800,height=500");>Add app to Your Page!</a>
and then refresh your browser & click it, and after you've added it to the page you can remove it again.
i've setup a application that has a path to:
www.some_page.com/index.php
on the page i have a link that goes to:
www.some_page.com/picture.php?number=123
this page displays in the same fb iframe application.
My question is how to get to www.some_page.com/picture.php?number=123 from an outside link?
if i just link to it it will take me to the page but outside the facebook app, and i need t to take me to that page inside the app..
i guess that when i click on that link i have to send the user first to accept the app access then got o that page ?!
any ideas?
Thanks
edit 1:
** what i want is to place a link to www.some_page.com/picture.php?number=123 on another site and redirect me that page inside the facebook app
There are 2 options to set a facebook app:
embed your www.some_page.com inside an iframe (this will make sure all your links will stay inside)
Follow this: http://developers.facebook.com/docs/appsonfacebook/tutorial/ and make sure you don't have target="_blank" this is a better option and your links should open in the same scope.