visiting facebook profile after clicking facebook like button - php

Normal facebook like api https://developers.facebook.com/docs/plugins/like-button/ if you include it in your web page just allows you to like that page and do nothing else . Is there any way where in I can open home page of person linking that page?

I found this answer facebook has something called as edge.create event (https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/) with help of this i can redirect it to that persons home page

Related

Invite Facebook's friends from own website

When someone visits my web page, I would like to enable him to share the visited web page on his facebook friend's wall, so that other people can also click on the shared link to come on the visited webpage.
Condition: The visited webpage should appear on the facebook wall of selected friends and I would like to throw an user-id with the link so that when someone clicks on the link on facebook wall, when he comes on the web page I can identify who did share the web page by his user-id.
I did try: the facebook send button, link button, send dialog and feed dialog, but somehow none of these meet the requirements above. Thank you so much for answering!
Is this something you looking for? ->https://floating-headland-9554.herokuapp.com
i created a invite friend button at the page for me to send request to my facebook to like my page.
you can view source and get my code, it all javascript integrated.
regards,
woolei - facebook application consultant
website - www.wootube.woolei.com

Link to Facebook Fanpage Iframe

I have a problem with my fanpage. A gallery script is running a my webspace and i put it in the app also in th iframe of the Fanpage. The gallery script has get an Share button to post the photos on facebook. This part of it is running fine but when i clicked the link that was posted in Facebook i had been reffered to my page on my webspace and not to the iframe with the webpage and the photo. Is it possible to edit the link to go to this page in facebook iframe?
This is not a problem in general. You can try to redirect your website into the Facebook tab application my checking the HTTP_REFERRER and the url. You might have a look at this example
There is an URL you can try to call and see if you get redirected to the right application. Additionally, you can add app_data-parameters to the URL to identify the real target into your app.
All that can be done by the following code:
// set the target facebook page name and id to perform a forceRedirectToTab()
$tmpFbHelper
->setPageName($iniHandler->getIniSetting('facebook.'.fbHelper::getAppNamespace().'.page.name'))
->setPageId($iniHandler->getIniSetting('facebook.'.fbHelper::getAppNamespace().'.page.id'))
->setSecret($iniHandler->getIniSetting('facebook.'.fbHelper::getAppNamespace().'.secret'));
// perform a redirect to the facebook tab application if someone opens the url out of facebook
// the facebook-linter is not affected by this :)
$tmpFbHelper->forceRedirectToTab();
// perform a deeplink if for example a special url is called or you identify some app-data
$tmpFbHelper->performDeeplink();
You will have to look at your published links into the stream so that the PHP-code finds out that you will redirect and deeplink!
I hope this ideas might help you :)

Creating a google plus / digg like social bookmark button

For a client of ours we need to create a share button for his site so that the users of his site can add this button to their blogs / sites and others can click on it and it will just open up a popup asking the user to login (if already logged in, the link bookmark page appears) to the clients site and bookmark it. Can somebody guide me on how to do it with php and javascript?
Instead of trying to implement this yourself why not try a 3rd party plugin like http://www.sharethis.com/ ?
It does all of the leg work for you and is very flexible.

Link website and Facebook Page

I have website with like button and facebook page that was created manually. I want link these pages. So when user clicks like button, he subscribes on facebook page and he will recieve all updates in the future. How can
This would depend on if the like button is "liking" your Facebook page, or your website URL.
If it's liking your Facebook page, then the user is automatically subscribed to all those updates - just like if the user had clicked "like" on Facebook.
If it's liking your website URL then you can't make them automatically like the facebook page too.
I think, when you put like button of you FB page its linked automatically.

Oauth dialog redirection php in Facebook. How to redirect to app page

I am developing a Canvas application in Facebook in php. When the user allows the permission it's redirected to my site, as the say in the help page https://developers.facebook.com/docs/reference/dialogs/oauth/.
But I don't want to be redirected to my site, I want to be redirected to the facebook page which contains my site in an iframe. How can I do this? It should be quite straightway.
If the user clicks "Allow", they will be directed to
http://www.example.com/response#access_token=...& expires_in=3600
If the user clicks "Don't Allow", they will be directed to
http://www.example.com/response?
error=access_denied&
error_description=The+user+denied+your+request.
I don't want to go to example.com but to facebook.com/app/ID_APP which contains example.com
EDIT:
after Floyd Wilburn's answer, I tried to put my app page but it doesn't work. It gives me an error. While the right URL looks like this
https://www.facebook.com/dialog/permissions.request?app_id=53434949999999&display/=page&next=http%3A%2F%2Fwww.example.com%2Fapp%2F%3Fnext_url%3Dhttp%253A%252F%252Fapps.facebook.com%28403a2224870942%252F&response_type=code&fbconnect=1&perms=email%2Cread_stream
(we can see the my site url example.com encoded with a parameter 'next_url' to which the user will b redirected from my site page)
the URL of the wrong way looks like this (Just changin my site to my facebook app url )
https://www.facebook.com/dialog/oauth?client_id=185340534870942&redirect_uri=http%3A%2F%2Fapps.facebook.com%2F534349499999s992%2Fhello.php
So my solution is what I commented. The user gets to my site and is redirected to the facebook app URL.
Anyone can guess why Floyd Wilburn's solution doesn't work for me?
Thanks
Just set the redirect_uri parameter to point at http://apps.facebook.com/yourapp/somepage and it will go there instead.

Categories