facebook, how to get to a application page? - php

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.

Related

Adding a facebook page tab using Facebook PHP SDK v5

I have created a facebook application. Using php code to adding a tab in the Facebook page. And I want to change 'Secure Page Tab URL' for tab on the same App but I don't know how to do it!
Example:
tab A -> Secure Page Tab URL A / tab B -> Secure Page Tab URL B
Does any one have an idea about this? thanks!
You can only have one Secure Page Tab URL per App. If you want to show different content on different Pages, you have to parse the signed_request POST parameter to get the Page ID - and show different content depending on that ID.
More information: https://developers.facebook.com/docs/games/gamesonfacebook/login#parsingsr
Btw, it is not possible to add one App several times to one Page, just in case that´s what you want to achieve.

Make sure page can only be accessed inside page tab

I'm building a facebook app that should only be available to users via the facebook page tab.
This means the page may not load when openend outside the facebook page tab.
Is there any way the achieve this via PHP?
I thought of getting the parent url, but since the PHP is loaded inside the iframe I doubt it's even possible... Could go for a Javascript approach but I want to disable the access to the page server-side...
Thanks.

Efficent url redirection in php

I am using a url redirection technique similar to google
Example
if you type wikipedia in google you get a wikpedia page result but if you click the link it will first go to this kind of redirecting link
http://www.google.com/url?some_paramaeters_for_wikipedia_page_redirection
and then it will go to
http://www.wikipedia.org/
i have made similar algorithm in my website and its working properly;But as in google when you want to copy the link location
it doesnt copy the main web link
http://www.wikipedia.org/
Instead it copies
http://www.google.com/url?some_paramaeters_for_wikipedia_page_redirection
I want to know if it is possible for users to copy the orginal link instead of url redirecting link without changing redirecting method.
Thanks for your info
Yes, what you should do is keep the real link in the href attribute (so the "Copy link location" works),
and with a bit of Javascript, on the click event of your link, replace this real URL with your redirecting one's.

Link to a certain page inside a Facebook Tab application

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!

Personalized fanpage Tab

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.

Categories