Force OpenGraph "Crawler" from Facebook, to "jump to another url" - facebook

Hy guys, is there any way to force the facebook crawler to jump to another URL. (With Javascript)
Example: I have canonical Facebook URL's for Like Buttons and more.
They Looks like this:
http://www.harddance.at/eventdetails/45/PreStylerz+Excalibur+Ybbs
On the Page, i create Anchor Navigation URL's, like this:
http://www.harddance.at/#/eventdetails/45/PreStylerz+Excalibur+Ybbs
When i add an "og:url" meta, the Crawler Jump to the given page, and search for Metatags.
Is there another "Build in" way, with Javascript, to force Facebook to do this.
Chris

"is there any way to force the facebook crawler to jump to another URL. (With Javascript) "
With javascript? Nope. Facebook's linter doesn't process javascript.
You will need to implement URL rewriting on your server. There are many ways to do so, and it depends on your server environment to determine the one that will work for you.

The Way, i found out now is, replace #, with #!. Facebook make an "escaped_fragment" and send it as GET param to the Page. example.com/#!/test/id Facebook would parse: example.com/?_escaped_fragment_=/test/id And there, i could create my OpenGraph Tags!

Related

Facebook do I need app_id to integrate open graph on my website

I have been reading about using Open Graph (OG) meta tags to improve the way facebook works with your website. I have read two tutorials that say to create an application and use the application ID. But I am not developing an application, all I have is a business page... Can I just the page ID?
Can anybody also point out any good, simple resources around the using OG in my website?
Thanks
The sharer.php method (which is deprecated) allows you to post without an application. The feed/post method appears to require an app_id, though it's possible that there's some way around that. On the bright side, there's nothing complex about creating an application, so, if that's what you must do, I'd say just do it :)
Here is an example of how it works *with an app using the feed/post method (you'll need to click the "Post to feed" link at the top (yes I know it doesn't look like a link!).
and Here is the same exact example only using Sharer (notice that this time it's pointing at a slightly different url (drawImageForFB2.php instead of drawImageForFB4.php).
I use a php to render the tags based on the vidId that I collect but that's neither here nor there... you could just as easily have this as a static HTML page.
The innards of the OG tag are just about identical and the app_id tag in the OG is entirely optional as it pertains to the second example).
Oh, and addthis does it using the dialog api which looks like this
https://www.facebook.com/dialog/feed?redirect_uri=http://s7.addthis.com/static/postshare/c00.html&app_id=140586622674265&link=http://support.addthis.com/customer/portal/articles/381222-optimize-facebook-sharing#.UQ8bBJM9KQk.facebook&name=Optimize%20Facebook%20Sharing&description=

Facebook like a different domain

OK, I have the standard Facebook Like code.
But we are ajaxing in Tumblr posts from the Tumblr feed and putting the FB Like button in.
So we are LIKING the Tumblr post URL.
However the page is not on a Tumbler URL, so FB momentarilly shows the comments box, then replaces it with a Confirm button, which triggers a popup. Like in the popup, then it allows you to use the normal JS comment that should appear on the button.
QA and UI have flagged this up as unacceptable, so is this a massive UI failing by FB? Whatever it is, and how can I get around it?
If we LIKE a unique URL on our site/domain this works as intended;
BUT THEN we would have to write a backend to receive that URL and present OG tags for FB to scrape, probably grabbing from the tumblr post.
Yes, by default the Like plugin it will search the page for og:metadata,
to go forward you can use the new build in, Open Graph Like Action
http://developers.facebook.com/docs/opengraph/actions/builtin/likes/
So, now you can associate each Open Graph object with a like.

Is it possible to Facebook LIKE URL without knowing OBJECT_ID and without the facebook API?

Basicly I want to do the same what Facebook API does but without the API. Any ideas?
If all you want s to add a facebook like button to your website, then you can use the "like button generator" here http://developers.facebook.com/docs/reference/plugins/like/
Use the "get code" button at the bottom.
If you need to like different pages, then it's easy to grab the code (as per above) and just programmatically substitute in your URL for the one you put in the code above.
If you need anything more than this, you will need to provide us more information. Starting with what language you use, what you've already tried and what form you'd like the "LIKE URL" to be in when you're done.

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 :)

How to integrate Facebook Comments plugin on a private site?

I've successfully integrated the comments plugin on a site that requires our own custom login. However, when the user leaves a comment with the option "Post to Facebook" checked, the update on the user's news feed displays "Object moved" as the title of the page instead of the actual title.
Is there a way to specify the title in a metatag or an attribute or some other way that doesn't require the plugin to access the page directly?
No, there really isn't a way to do that. The opengraph tags SHOULD do this, but as far as I can tell Facebook always hits the link in the comment. One thing you may want to do is look out for Facebook's crawler User-Agent string and return an abbreviated form of the page content (but this may run afoul of their rules, so I'm not sure you want to do that without some thought about Facebook's possible reaction).
You can use the Facebook URL Linter (at http://developers.facebook.com/tools/lint) to see what's happening when they try and reach out to your page.
If you're using Open Graph, the page needs to be accessible either publicly -or- you could whitelist the facebook user agent for access - facebookexternalhit/1.1
Actually it's facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php).
See http://www.quora.com/What-is-the-user-agent-string-for-the-Facebook-like-share-crawler.