Disable / configure "play" link on facebook shared publication from a facebook game - facebook

I have a facebook app which can only display content inside of a page tab app because it needs to know the page id to know which content to display.
My app needs to have the "invite friends" functionality and was created on the 2.4 API version, so I had to define my app as a game.
The problem is :
when I share something from a facebook page tab app, there's a "play" link on my publication and that link redirects to the app, not the page tab app.
I couldn't find any information to know where to redirect the user.
Can I disable this link?
Or configure it to redirect the user to the page tab app?
Or can I have the "invite friends" functionality in any other category than game in the 2.4 API?
I use the facebook JS SDK to share :
FB.ui(
{
method: 'share',
href: $(this).attr('href'),
},
function(response){});
Thanks for your answers and advices.

I got this answer from a facebook comunity group :
" Your app needs to be a game and have a canvas implementation, if you want to use invitable_friends. It needs to be playable on canvas, without redirecting anywhere else first. If that is not the case, or your app is not really a game – then you can not use it.
Possible alternatives are listed here: https://developers.facebook.com/docs/apps/faq#friend_invite "

Related

How do you create a mobile friendly Like Gate for a Page on Facebook?

I've put a Like Gate on a few of my Facebook Pages and I'm getting a lot of complaints saying that people can't access the content via their mobile device since the mobile version of the facebook website, and the facebook apps for ios/android, don't support tabs on Facebook.
I see there are services out there (I'm not sure how legit they are) that offer a way to create a mobile like gate for your page tab, but I can't find any documentation on how they do it. These services are not suitable for me, because the content on my tab is custom and dynamic.
So, how can I create a interstitial page for a mobile page that requires the visitor to have liked my Page on Facebook before they can proceed? This has to work for new users, as well as existing users who re-visit the tab and without requiring an install to an application.
Thanks!
One approach you can take for a mobile site is to check that the user has liked the page in question via the JS SDK.
If you have a logged-in user to your application, you can Subscribe to the authResponseChange FB event within your JS SDK initialization, or call a function directly to make an API request to verify if the user is a fan of your page.
In your initialization:
FB.init({appId: YOUR_FB_APP_ID_HERE });
window.fbAsyncInit = function() {
// React to a user clicking an on-page Like button:
FB.Event.subscribe("edge.create", verifyUserLikesPage);
}
You can verify that the user likes the appropriate page in the like handler:
function verifyUserLikesPage() {
FB.api("/me/likes/"+FBID_OF_PAGE_TO_ENSURE_THEY_LIKE, function(apiResponse){
if (apiResponse.data && apiResponse.data.length > 0)
// User likes the page. Enabled them to proceed
else
// User does not like the page. Require they click Like.
}
}
More information on the edge.create subscribe via JS available here: https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

Facebook - call canvas application from page

I have develop simple facebook canvas application.
http://apps.facebook.com/myappname/
I want to create page and call this application when user click on page.
Any idea how to do this?
-Thanks
It's called a "page tab app". Excellent walk thru located here: https://developers.facebook.com/docs/appsonfacebook/pagetabs/

How to redirect the user to the log in page in a Facebook App

I am hosting a Facebook app on Google app engine, I need to make sure the user is logged into facebook before anything.
What I can currently do is display facebook's log in button using fbxml, but I prefer the user would be redirected to Facebook's log in page if he wasn't logged in, then back to my app's main page, this way I can make sure that the user is logged in before doing anything.
I am new to Facebook apps, I read here that I can redirect the user to
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL
in order to authenticate him. But using GAE's self.redirect(url) doesn't work, the page stays the same. I was hoping I could do something like this in my handler:
if u'signed_request' in self.request.POST:
facebook.load_signed_request(self.request.get('signed_request'))
if not facebook.user_id:
self.redirect("https://www.facebook.com/dialog/oauth?"+
"client_id={0}&redirect_uri={1}"
.format(FACEBOOK_APP_ID, EXTERNAL_HREF))
return
but as i said earlier this doesn't work.
I'm assuming by 'Facebook App' you mean a Canvas App - so something that will live at https://apps.facebook.com/YOUR_NAMESPACE from a user perspective?
If so, you'll need to add the redirect via Javascript using window.top, as your app is loaded in an iframe. See https://developers.facebook.com/docs/appsonfacebook/tutorial/ and search for 'top', then view the example toward the end of the page.
There are also good examples on the Php Sdk that facebook provides. I like the with_js_sdk.php example. It runs seamlessly and is good to follow.
https://github.com/facebook/php-sdk
http://developers.facebook.com/docs/reference/php/

do you need app_id for dialog.feed

I have a simple site with a playlist-driven flash movie player.
the site is NOT a facebook app.
when a user clicks a video to watch from the playlist, that video's title, description, and thumbnail are registered in javascript variables.
the site also has a facebook button for sharing. If the user hits the fb share button while video_123 is playing then the video_123-info should show up when the share posts to the user's fb wall.
the only problem is that the http://www.facebook.com/dialog/feed seems to require a app_id, but my site is not a fb app.
any suggestions please?
thanks.
You should have application to use Dialogs.
Just create an application configure it pointing to your site (without configuring application canvas) and use Feed Dialog
Update:
If you must not create application for any reasons the only option for you is to use Facebook Share button (which is deprecated) see "Creating Your Own Share URL" section...
Update 2:
Share button is deprecated and it's documentation is no longer available (link above redirects to documentation of Feed Dialog, old page on web-archive)

After creating an app wont show app page in any links or url

I have made many apps and have many client pages, but for some reason I just created a custom tab and there is no visit app page link on left side. Also I typed in the url for the app page and it said "facebook app not found", but it shows if I add static html: I Frame tabs
Facebook announcing that they will remove all App Profile Pages on February 1st, 2012.
You will find answere here: https://developers.facebook.com/blog/post/611/
the profile page is normaly found via this url:
https://www.facebook.com/apps/application.php?id=your app id
The new applications won't get a page automatically ... to add you application check de docs here : https://developers.facebook.com/docs/appsonfacebook/pagetabs/
It is possible to create a page per application, these will be similar to normal pages ( or fan pages )
Hope this helps, cheers!