Facebook URL truncated - facebook

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.

Related

Facebook share change link text

When adding a share button to my site as follows:
https://www.facebook.com/sharer/sharer.php?u=http://www.domain.de/christmas-gewinnspiel
When I click the button, it takes me to facebook and the the post to wall page, but the link text says "www.domain.de" although the URL of that link is correct ie. (http://www.domain.de/christmas-gewinnspiel), how can I change the the link text?
The page url is giving a 404 response. I think showing the basic domain is the standard behaviour for sharing, the link itself (if you'd click on it) is the correct one, but giving a 404 as described.
Also, think about adding the OpenGraph meta tags to make the shared info look nicer:
https://developers.facebook.com/docs/reference/opengraph/object-type/website/

Facebook like button - Circular redirect path deteted

Hopefully, someone here can give me some light. I have been researching this issue for a couple of days now, and cannot find a suitable solution.
First of all, I have used the facebook debugger and I understand what the error is, except that I am not sure how to fix it. You can see it here:
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.viewrecalls.com%2Fshow%3Fq%3DGuidecraft%2520Mega%2520Profit%25204-in-1%2520Dramatic%2520Play%2520Theater%2520Toys%26amp%3Bu%3Dhttp%3A%2F%2Fwww.cpsc.gov%2Fcpscpub%2Fprerel%2Fprhtml12%2F12131.html
I guess, facebook wants me to use either www.viewrecalls.com/show or www.viewrecalls.com in my og:url tag, as both of them passes the validation; however, if I do that, then the information displayed in Facebook will not be the information from the original link, and the user will be redirected to an URL that is not the original one or intended one. I am not sure how to resolve this issue.
My website queries an API and lists the query results. Once you click on a result from the listing page, it goes to a "show" page, where the details of the item clicked is shown. I have "long" QueryString going and one of the parameters is an URL. The QueryString is however encoded, and everything works perfectly, except that the facebook debugger gives me that validation error, and the button is not showing a count, it only shows 0 even though it posts to my facebook wall.
Any help will be greatly appreciated!
Thanks!
Point your og:url tag (on the URL you're pointing a Like button at) to the URL you actually want the user to like, which has the metadata for that URL - image, title, etc
A circular redirect path almost always means an og:url tag on a page points to another page, which redirects (either by og:url, a canonical ref tag or a HTTP redirect) back to the first page or another page in the redirect chain.
Facebook's Debug Tool should show you the steps followed and where the redirect is
{edit}
In your case, i'm not 100% sure, but it looks like part of your URL has a & encoded in it, which may be the problem.
I manually curl
http://www.viewrecalls.com/show?q=Guidecraft%20Mega%20Profit%204-in-1%20Dramatic%20Play%20Theater%20Toys&u=http://www.cpsc.gov/cpscpub/prerel/prhtml12/12131.html
and get an og:url tag of
http://www.viewrecalls.com/show?q=Guidecraft%20Mega%20Profit%204-in-1%20Dramatic%20Play%20Theater%20Toys&u=http://www.cpsc.gov/cpscpub/prerel/prhtml12/12131.html
which, when i curl THAT, has an og:url of
http://www.viewrecalls.com/show?q=Guidecraft%20Mega%20Profit%204-in-1%20Dramatic%20Play%20Theater%20Toys&u=http://www.cpsc.gov/cpscpub/prerel/prhtml12/12131.html
it looks like another & is being added into the URL each time and recursing - should the ampersand not be encoded in a URL as %26?

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 Share button returning error

Example url:
http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.rugbydump.com%2F2011%2F09%2F2124%2Frugby-world-cup-daily-tonga-beat-japan&src=sp
That's what's generated by the Share JS. If you visit the link (after decoding):
[...].com/2011/09/2124/rugby-world-cup-daily-tonga-beat-japan
You can view source and see open graph meta tags.
If the share url is changed to:
[...].com%2F2011%2F09%2F2124%2Frugby-world-cup-daily-tonga-beat-japan2&src=sp
(Adding a 2 to the end of the url) the result is fine. Likewise with other posts:
http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.rugbydump.com%2F2011%2F09%2F2119%2Frugby-world-cup-daily-christchurch-revisted&src=sp
So all I'm getting is "Error" with no way of knowing what went wrong.
Any insight would be great. A thought was that the url was flagged or banned by FB but no way to tell.
[...] is used cause I can't use more than 2 urls.
I re-linted your URL in the Facebook developer debug page:
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.rugbydump.com%2F2011%2F09%2F2124%2Frugby-world-cup-daily-tonga-beat-japan%2F
and it appears to work fine now. Facebook caches the data obtained from a page, so it's likely they hit your page during a period in which it had an error message instead of the usual contents.

Facebook Like Button Keeps Resetting

I'm trying to add a facebook "like" button to my page, and it is appearing just fine. My problem is that once it is clicked by a user, it says "Like NUMBER" then resets as if the request was canceled or something.
The weird thing is that if I try to like a page using my facebook account it works, but I tried letting a friend like some content and this behavior appeared.
I created a facebook app, specified the site url with a trailing slash, and site domain. I used the app ID with FB.init, and with the open graph tags. I can't figure what I'm doing wrong here. Any help would be appreciated.
Sample page can be found at: http://wiseolive.com/en/doctors/3881-khalid-jamal-salaymeh
First, for the count to work correctly, Facebook needs to have access to the page (in other words a public page). Check your URL in the linter tool (https://developers.facebook.com/tools/debug) to ensure it can been seen by Facebook.
Secondly, ensure your og: tags are correctly setup. Once again, you can use the linter tool to do that.
Facebook like buttons will show this behavior until they have been scraped by Facebook. That scraping (facebook like docs) will occur every 24 hours, when an admin clicks the like button or the url is put in the url debugger/linter. From what I can tell doing that will solve the problem for that specific link, but not any others you may have on your site.
I don't know of a generic solution for dynamically generated pages unfortunately.