Change Facebook comment tool notification URL? - facebook

I have created an app using Facebook Canvas and loaded it as a Page Tab on a Facebook Page. The app is basically a simple site that contains several pages, each with an own comment section (Facebook Comments).
When someone leaves a comment and I reply to it, that person gets a Facebook notification saying "[Name] replied to your comment on [url]". There are two issues with this:
1. The server that we put the app on has an ugly url. We do not want to show the url anywhere. That's why we wanted to use the Facebook Canvas in the first place - so that you could view the app inside Facebook and not on the server itself.
2. When you click the notification, it brings you to the app OUTSIDE of Facebook. It sends to you that ugly url. I wish for it to take you to the app INSIDE Facebook, that is facebook.com/[our_page]/app_[app_id]
I was wondering if there is there any way to 1) change the url that the notification outputs and 2) the url that the notification sends you to.
Hope someone can help with this!

I have found that setting the data-href to the https://apps.facebook.com/app-name solves the problem. When someone uses the comments form and they are replied to, the Facebook notification will say "[Name] replied to your comment of [App name].
The issue that remains is that this does not give you a separate comment tool on each page.

Related

How to implement href attribute in facebook notification?

From FB oficial documentation
When people click the notification, they'll be taken to a URL you
specify with the notification.
I have been strugling to understand what canvas app actually is. I have managed to actually send and recieve notification, however when clicking to notification fb redirects me to apps.facebook.com/1111111111111111/home?fb_source=notification&fb_ref=test where a lot of 1`s is meant my app id(did not know if I should protect that so better protect) and "home" is href I specified in href parameter when making post to userid/notifications endpoint. The first part is exactly as in my settings tab listed canvas page but I can not change it.
I expected that on click I would be redirected to my website. Could some one please explaine me what have I misunderstood? I think the problem is that I really do not understand what fb canvas app is and how it works.

Redirect Facebook App To External Page

I'm having issues configuring my Facebook app to behave as I want when posting information via the Feed Dialog. I've set up an app and created a link that correctly posts my content when clicked, but I can't figure out how to make the link to the app in the resulting post redirect where I want it to.
As an example, here's a post made via Instagram.
If I click on the 'via Instagram' link, I get either prompted or automatically redirected from the destination URL http://www.facebook.com/apps/application.php?id=124024574287414 to www.instagram.com.
I've seen other posts suggest you can do something similar using a JavaScript redirect from the App Canvas page, and I've got a proof of concept doing this, but since I've seen Instagram and other apps do this seemingly internally to Facebook I'm convinced it's possible to do more cleanly.
That link goes to your app's canvas URL (apps.facebook.com/something) or website URL as defined in the app settings, it can't be configured with any more granularity.
This seems that it will probably do the trick most easily: http://woobox.com/statichtml
See the redirect radio button in the image they have.

Facebook app how to post on users wall

I've developed an Facebook app: http://ek2012spel.startpagina.nl/. I've developed one before and the last time I've included the option to post a message on your wall whenever you scored a point.
But I noticed Facebook changed it's policy to prevent spamming to a wall. And I salute them for it. So I wanted to try something else.
Include a Like Button.
Only the people that press the Like button get news updates in their stream.
The news updates won't be automated. It will be me telling them a new round has started or something similar.
I'm pretty sure this is (or at least was) possible. Question is; how?
Should I create a seperate Facebook user for my app?
A new page (or is it called tab)? And link the Like button on my app to that page?
Sub issue: My current Like Button is linked to an (old) URL. The URL redirects to the new one. Any chance I can change the URL without losing all the likes?
That document was referring to an old App Profile page - these were removed in February -I've updated that doc to show the current way to create a page for your app (the option is now in the 'Advanced' tab of the app settings.)
Based on what you've said above, you should do one of the following:
Create a page for the app and get users to like it, and then use the page to post updates for the game's user
Use app to user requests to alert the user that something has happened - this will increment a counter in the user's bookmark for your app to bring them back to it
Obtain the user's email address from the API (needs the email permission) and email them directly.
Posting to user's timelines (/USER_ID/feed) automatically each time you have news to share will result in the spam filters shutting down your app very quickly indeed (bear in mind this will appear to all their friends as a message 'from' that user)

Facebook PHP SDK - How to Handle The Situation When A Non-User of Your App clicks on an App Notification They Have Been Sent By A Friend?

I have a facebook app that a user can send an app request to friends. The notification doesn't do anything special, it is simply a notification to say their friend has used the app and they should try it too etc.
What happens is, the app user's friend receives a notification, it appears on their screen, but when they click the notification they are taken to a screen containing the canvas with the facebook header at the top.
The problem is, my app tab is fan-gated so all they see is an image prompting them to click the like button.... and there is no like button. Only an image and the facebook header.
So, to summarise, how to direct users who receive app notifications from friends to the actual app tab and not the canvas page?
I can provide code but I don't think it's necessary for this question.
I've read this documentation on Facebook but it hasn't made me any wiser :/
http://developers.facebook.com/docs/channels/#requests
Any help and pointers are much appreciated.
You can do this check in Javascript:
// Check if address was from a apprequest
if(window.top.location.search.indexOf('request_ids')) {
// Redirect to your tab
window.top.location = 'http://www.facebook.com/BMW?sk=app_167533506634184';
}

Facebook App On Mobile - View Notification - "Privacy check failed - You can not see that"

We've just developed a Facebook application which has a piece of functionality that allows you to post to a friends' wall. Fairly simple piece of functionality, and it's been working so far on the main www.facebook.com website. If I receive a notification that someone has posted on my timeline, and can click the link, and see the post. This is fine.
However, move to the iPhone app, or the mobile website, and it's not the same. I see the notification, click the link, and then see the following Facebook error message:
Privacy Check Failed
You can not see that.
Interestingly, in the mobile website, if I simply change the subdomain part of the URL in the address bar from
https://m.facebook.com/permalink.php?story_fbid=XXX&id=XXX
to
https://www.facebook.com/permalink.php?story_fbid=XXX&id=XXX
To access the full site, it works fine, and I can see the post (I've blanked the IDs for privacy).
After some research on the web, I can't anyone who has recently seen this message. Has anyone else seen it before? My instinct is telling me it's a bug with Facebook, but I want to check I'm not missing anything.