Facebook comment/like url - facebook

Am having difficulty with the url for the facebook comment and like plugins. if I put in a simple url like "www.example.com" it works fine but my app is on a subdomain and uses querystrings to differentiate between different page states. So a sample url would be something like "facebook/example.com/index.php?id=001". However it appears facebook doesn't like this and keeps saying it is unreachable.
I can't believe facebook would limit the scope like this. Someone else must have encountered this. Any suggestions?

Facebook posts have an id something like 123456789012345_123456789012345.
The part prior to the underscore is the page id. The part after is the post id. The URL would be https://www.facebook.com/pageid/posts/postid, or https://www.facebook.com/123456789012345/posts/123456789012345.

Check your URL in Facebook's Debug Tool and this will show the tags Facebook is detecting on your page -in particular check your og:url tag isn't ommitting the URL parameters

Related

Facebook appends parameters to a url when it is liked

I’ve recently added a Facebook like button to a site of mine and all seems to work fine except that the post on my Facebook wall has a url with a load of parameters appended to the url.
Example: http://domain.com/this-is-a-new-post-to-test-the-url?fb_action_ids=1403388974344336068&fb_action_types=og.likes&fb_ref=sp_facebook_57&fb_source=aggregation&fb_aggregation_id=247881481237582
I have set the open graph meta tag but this does not seem to make any difference.
What I find interesting is that some pages I’ve liked (on a different domain) don’t have these parameters appended to it.
The question is: how to “sanitise” the url on my Facebook wall so it looks like http://domain.com/this-is-a-new-post-to-test-the-url and NOT like http://domain.com/this-is-a-new-post-to-test-the-url?fb_action_ids=1403388974344336068&fb_action_types=og.likes&fb_ref=sp_facebook_57&fb_source=aggregation&fb_aggregation_id=247881481237582
Facebook adds these parameters so that website owners can keep track of where incoming traffic from Facebook originated and can not be removed.

Facebook URL truncated

I'm creating a web app which uses Facebook feed dialog plugin in some pages. When I try to share these pages, the URLs posted to the news feed get truncated.
I'm using the direct URL approach. When the user wanna share something, she clicks in a link that is going to redirect her to the feed dialog. The link is composed as shown below:
https://www.facebook.com/dialog/feed?app_id=MY_APP_ID&link=SHARED_URL&redirect_uri=REDIRECT_URL
For example:
the URL I have in the "link":http://www.simplecity.com.br/DP/Index/?CID=0&UID=1
the URL I get in the news feed:http://www.simplecity.com.br/DP/Index/?CID=0
Has anyone already experienced this issue? Any suggestion?
The usual cause of this is forgetting to encode the link when you pass it into the Direct FB URL.
Are you forgetting to urlencode the link parameter (i'm especially thinking of the &) when creating the URL you're passing the user to?
I recently encountered the same problem with a straightforward link - I inserted:
https://example.com/page.html
into a page post. However, on the page it was rendered as:
https://example.com/page.ht...
as if the last two characters of the html extension were merely not displayed, as indicated by the elipsis. However, if you copy the link from the post you find that those chars are actually missing and the link resolves as 404. If you edit the post and reinsert the link, it is saved correctly, although the 'overflow' characters are still hidden by the elipsis. Very misleading.
What seems to work best is if you use the Facebook Developer OG tags in the page and then use Open Graph Debugger to scrape the link. This puts the URL in the FB realm and it picks up the correct link just fine. As you are doing this, the debugger tool gives you feedback to the effect: "This is the first time we have seen this URL"; which is baloney if you have put the URL on a FB page beforehand.
I have filed a bug report with Facebook; but I am not expecting them to own up to this bug.

Feed dialog to event/fan page says "Sorry, something went wrong." after clicking share

Having some issues with the feed dialog when attempting to post to a event or fan page. In my application I am using the JS API and FB.ui using the method feed.
But for a demonstration you can do it using the feed url too for example:
http://www.facebook.com/dialog/feed?app_id=131727613511269&to=287203454659917&redirect_uri=http://www.timeanddate.com/
After clicking share you get the:
Sorry, something went wrong.
We're working on getting this fixed as soon as we can.
Where:
app_id = your app
to = a event / fan page
redirect_uri = a url you are allowed to redirect to
note that the app has publish_stream permissions. (it also has manage_pages for fan pages)
The app in question by the way is: http://apps.facebook.com/tndcountdown/
Thanks,
Andy
EDIT:
An Example taken straight from the documentation:
http://www.facebook.com/dialog/feed?app_id=123050457758183&link=http://developers.facebook.com/docs/reference/dialogs/&picture=http://fbrell.com/f8.jpg&name=Facebook%20Dialogs&caption=Reference%20Documentation&description=Using%20Dialogs%20to%20interact%20with%20users.&message=Facebook%20Dialogs%20are%20so%20easy!&redirect_uri=http://www.example.com/response&to=287203454659917
just replace to=287203454659917 with an event.. (make a test one like it did there)
A few issues I've run into will dialog is that Facebook tries to fill in any missing data. So if you don't provide a description and caption, Facebook will try to scrape the page to get that content. Depending on how the page responds to the "scraping" Facebook will error out. I always make sure I include at least a space for those fields.
It seems the feed url you provided is similar to what is in the documentation. But the demo in the documentation has extra parameters.
I'm about to add page support to my Facebook app, which does the same thing as yours.
http://apps.facebook.com/countdown-timer/
As I posted here - Facebook Send Button - 'Sorry, something went wrong.'...
I had the same problem & worked out that this was due to linking to a Facebook page that did not have a vanity URL set up (i.e. http://www.facebook.com/CubicMushroom rather than http://www.facebook.com/profile.php?id=261963707177053). If you set up a vanity URL for the page it seems to work OK (providing you link to the vanity URL version of the page URL).
To claim a vanity URL, once you have a certain no of like (it used to be 25, but think it's a little lower now) visit https://www.facebook.com/username/

Facebook social plugin comments after URL change

Just a simple question, I had facebook comments integrated in my page here:
http://www.bbcnepalidrama.com/main/node/3
Now I have changed the URL alias like this:
http://www.bbcnepalidrama.com/main/about
I have also set a 301 redirect in the old URL which redirects to the new one.
The Question is how do I get the old comments in this URL? They are missing now.
I think, that these comments will be forever associated with that URL and since you've changed it, as far as FB is concerned you are pointing to a different URL.
you can specify the old URL as “canonical” with an og:url meta tag.
see the FAQ about this.
This sucks in Facebook comments. I've launched a site with Facebook comments integrated, without setting the URL, and now when I do, the comments doesn't show up.
Your case seems to be easy, since it seems you're using Drupal. You can install the token and token_filter modules, so you can add the facebook comments code to a block and use the appropriate token that will return the node id from the current page.

How to like / share URLs inside Facebook that contain get-parameters

We are working on a facebook-app with lots of dynamic pages. As the app is embedded in a tab on a facebook page, the urls contain a get-parameter to address the correct tab/app. We want to implement like- and send-buttons for several pages within our app, but facebook seems to dump all get-parameters from urls within facebook. As the result all like- and send-buttons point to the facebook-page itself instead of the tab.
Does anybody now any workaround? We already tried redirects via an external sefor facebook urls only.rver but facebook seems to evaluate the links on click of the like-/send-button (and seems to follow all sort of redirects).
UPDATE:
Here is an example of a problematic url:
https://www.facebook.com/smartmobil.de?sk=app_171502639574871
UPDATE:
The problem seems to be independant of url get-parameters. It seems that the like-button does not work with any url starting with www.facebook.com
When used in a like-button everything behind the ? will be dumped. This seems to happen for facebook urls only.
Best workaround so far is to point your like buttons at external (non-facebook canvas) urls.
To make this work, you need to do some conditional redirecting to get the user back into your canvas URL. You can either use a client side javascript redirect:
<script>
window.location = 'http://apps.facebook.com/yourcanvasname/foo/bar';
</script>
Or you can do a server side redirect based on the useragent string. Basically, if the useragent contains 'facebookexternalhit' then render a basic HTML page containing OG tags, if not, redirect to the canvas URL.
Doing this means the Facebook sharescraper/linter won't follow any redirects back to the canvas URL, but any user that arrives at your URL will get back to Canvas.
i'm too searching for a solution to control the custom page tab's content through a get parameter (app_data). I still don't have a solution but here at least the reason why all www.facebook.com links are srtiped out of get params. Here at bottom the developer explains why.
Unfortunately I don't think what you are trying to do is possible. Posting a like programmatically requires you to specify a Facebook content ID or alias. This won't work for you because tabs to not seem to have an exposed content ID of their own, and instead use the Page's content ID with an additional parameter which you can't use with the graph.
Liking external links and other content that does not have an ID programmatically is prohibited. With an external URL, the first like of an unrecognised URL creates a new Facebook page for those likes to be represented on (which is the issue I've given up trying to fight), but presumably the presence of your Page's content ID alias (www.facebook.com/smartmobil.de) in the url is making Facebook choose you page rather than creating a new one.
The only suggestion I can think of this late at night is to target an external URL that performs a redirect via Javascript, rather than on the server, but Facebook may be wise to that too and I'm afraid I'm going to bed rather than testing it :)