I know that several similar questions has been asked but I still do not understand how to implement this.
I just need each of my users who install my custom tab to have their tab point to a unique url of my website (their profile page).
I know the url at the moment they install the tab :
FB.ui({
method: 'pagetab',
redirect_uri: https://www.facebook.com/dialog/pagetab?app_id=APP_ID&redirect_uri=YOUR_URL
}, function(response){});
How can I achieve this ?
Related
I am trying to share content from a website that I own to my Facebook page like this (using django but I don't think this causes the problem):
document.getElementById('FBshareBtn').onclick = function() {
FB.ui({
method: 'share',
display: 'popup',
href: '{{ site_url }}{{ request.get_full_path }}',
}, function(response){});
};
Everything works as normal. Sharing pop up window opens up and I choose to post to a page that I manage as the administrator of that page.
Content is indeed shown to my facebook page after a while, but only me can see it. Users that have liked/are following the page cannot see it.
They can see content created from inside my facebook page, though.
For some reason, content shared from another website is "hidden".
PS: I haven't purchased a domain, yet, for my website so I am using numerical IP (e.g. 'http://188.55.66.28:8008/articles/view/1') when I am sharing.
What am I doing wrong?
If posted stuff is only visible to you, go to "App Review" in your App settings and make sure the checkbox for live is set to the correct status:
ON - Your app is currently live and available to the public.
I try to create a facebook app for page tab each able to insert different "Secure Page Tab URL" for example
hxxps://fb.xxx.com/sub1 -----> page A
.
.
.
hxxps://fb.xxx.com/subX -----> page X
I try to use
function pageinstall() {
FB.ui({
method: 'pagetab',
redirect_uri: 'https://www.xxx/test.php'
}, function(response){});
}
But this method will insert only "Secure Page Tab URL" which filled in app setting page.
If it possible in javascript-SDK or php-SDK
Please suggest me.
Thank you,
Umpol
That is not possible – you can only have one page tab URL per app.
If you want to show different content depending on what page the app is added to – then get the page id from the signed_request that is POSTed to your app on initial load into the iframe.
https://developers.facebook.com/docs/pages/tabs#integrating
https://developers.facebook.com/docs/reference/login/signed-request
Like this? Right now, FB is stripping out the querystrings I'm using to track.
https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fpost%2F%3Fref%3Dfb-share
Using web links ?
You can redirect the user for another url, using ?redirect_uri=http://...
Track them and redirect them again for where you want .
You can try to include variables at the url too, and query for shares, comments and likes of each url ex: ?rel=track1 .
But thats not the best option .
You should implement facebook sdk and login the users, asking for publish_actions permission,, then you need get the response of the share funcion, it will come with post_id field, but only if you login the users as i said before .
FB.ui({
method: 'share',
href: 'https://www.facebook.com/davidaugustusbarreiradias/',
}, function(response){});
If the post privacy is set to public, you can view it using the response IDs, if users post as public and if they dont delete it .
Please be more specific about what you want, and please show the code you are using .
I'm trying to find out whether it's possible to remove or change application link from feed post when sharing a page tab ("XX minutes ago from [app name]" next to comment and like links where [app name] is a link to the application). But the application in question only provides a custom page tab, not a real application, so it's kind of annoying when users are pointed to the app page.
I'm using FB.ui share the page tab.
Or maybe someone has alternate solution to make the user experience better?
Here's the share code (with some modifications since the app isn't public yet :)
FB.ui({
method: 'feed',
name: 'name of the page tab',
picture: 'http://url/to/image.png',
link: 'http://url/to/page/tab',
caption: 'caption',
message: 'message',
description: 'description',
actions: [
{
name: 'Participate',
link: 'http://url/to/page/tab'
}
]
}, shareComplete);
*edit: just saw that the question was two years ago, oh well, I'll just leave this here for future reference :P
What I did was create a redirect.php on my server that just does a redirect to the page tab I want:
<?php
header('Location: PAGE_TAB_URL');
exit();
?>
then, on tha facebook app, I added a website as a new platform and enetred the redirect.php url as the the site url.
Now, on the share ui, when the user clicks on the app name it redirects them to the page tab. Only downside that the redirect url is visible on mouseovering the link but I can live with that.
I have googled and googled around for this and found the blog post from Facebook about remove app profile pages etc. I also found that you can go to this link:
https://www.facebook.com/dialog/pagetab?app_id=[ID NUMBER HERE]&display=popup&next=[URL OF YOUR DOMAIN]
The problem is what do i put in URL OF YOUR DOMAIN. I cant put a site url in the app settings because its not a web site application, its a page tab application. Any combo of URL's i try, it just errors with "URL not owned by application"
Any ideas or experiences with this?
Use FB.ui method of JS-SDK with method pagetab as shown in example of Add Page Tab Dialog documentation this will automatically provide needed info to dialog.
FB.ui({method: 'pagetab'}, function(){
// User either closed dialog or added tab, you can call Graph API to check...
});
You have to register the URL first with Facebook and then use it. First go to http://developers.facebook.com. Then go to your app and hit [Edit App]. At the Basic Info section, you'll find a textbox requesting you to enter the APP Domain. Once you save it will work fine.
I simply entered www.my-domain.com, no http, no slashes.