I have a website that supports few languages. Page detects and displays respective language based on browser settings (user can select desired language too).
Now id like to share this website with Facebook share.
According to Fb documentation i need to set a number of meta fields for needed language.
How can i detect a language Facebook is trying to scrape my website for? I was trying to use query`s fb_locale parameter, but it does not seem to pass this one with needed language.
Any ideas?
According to Fb documentation i need to set a number of meta fields for needed language.
This was never available for normal posts/shares in the first place, only for Open Graph stories - and for those it has been removed with API version 2.8, too.
https://developers.facebook.com/docs/apps/changelog#v2_8_deprecations
There is no way any more to do what you want.
Related
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=
We're running a canvas app that has fully localized og tags. Everything is working well except when users choose to manually copy the facebook app url (apps.facebook.com/mysite) into a post.
When that happens, we want the text in the posted message to be in the user's language. Instead, it's always uses the English text from the og: meta tags.
If I could detect which culture the user came from, I could change those meta tags. However I don't see anything in the request header or parameters that are sent from the scraper to indicate where the user is coming from.
I did see that there's an og:locale:alternate tag I could use to specify other languages the page is available in, but unless I get a second request from Facebook with a locale value I don't see how that benefits me.
How can I ensure the posted title/description is in the user's language?
Must it be done using the Localization section in the Facebook App settings?
If so, is there a way to automate it? Our translation workflow is pretty well established and I don't want to send translators into the facebook app to finish the job.
You most probably need some parameter in the querystring to differentiate the urls.
e.g
http://apps.facebook.com/my_app/en/
or
http://apps.facebook.com/my_app/it/
this parameter will actually set the active language on your app.
And facebook scraper will cache the localized title/ description from the meta tags.
I created a facebook app. It's in English. However I need it to be displayed in German (only if possible) by default. I went through the facebook manuals and, unfortunately, I couldn't find it.
Your thoughts?
UPDATE: Let me show what I want.
I (as an author) need it to be displayed absolutely in German, even any standard facebook label. I already set local to Deutsch (Setting->Advanced->Locale) but it's still in English.
Couldn't find what?
http://developers.facebook.com/docs/internationalization/
Added for question update:
Facebook:
If you're rendering a social plugin in an IFrame, Facebook
automatically translates the text because it's based on the viewing
user's locale.
If you're using XFBML, you need to load the JavaScript SDK in the
appropriate locale for your site. For example, if your site is in
Spanish, reference this script:
//connect.facebook.net/es_LA/all.js
The company I'm currently working for wants to create a button that lets people share their order on Facebook after they've paid, but with the deprecation of the "Share" button I don't really know how to do it.
The "Like" button does not seem fit for this. Any ideas, anyone?
There are a few ways to go about this.
You can use the standard sharer. This is good for one-off sharing or in cases where you don't have control or don't want to control how the share is rendered and you want Facebook to handle it.
http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>
It won't require you to have an app ID but you also won't get a nice control panel for your applications sharing history/insights. You can query and get some information about the URL your sharing though by looking through the open graph.
I.E
https://graph.facebook.com/?ids=http%3A%2F%2Fwww.cnn.com
https://graph.facebook.com/comments/?ids=http%3A%2F%2Fwww.cnn.com
You can set the URL and Title of the content. The sharer will then look at the metadata on the webpage your sharing to determine the contents of the share. More below.
You can also use the Feed dialog. Which comes with more customization options. The Feed dialog is the best option if your integrating sharing as an integral part of the application. I think at minimum you need to include the app_id,redirect_uri and link property. Look through the properties here. You will need an app ID to use this feed dialog and if your using the JS api you need to authenticate the user too. You can also invoke the dialog directly through a direct url where you don't need to pre-authenticate the user.
With either sharing method, you may wish to include custom open graph metatags on your webpage. This way you can influence how the Facebook scraper makes your share. You can set some default (pre-accepted by Facebook) open graph metatags on your page. Or you can create your own set now in the dashboard. In the Open Graph dashboard on Facebook you can customize how Facebook is supposed to read and interact with your metatags.
You can debug your pages open graph metatags by passing your URL through the debugger.
I.E
http://developers.facebook.com/tools/debug/og/object?q=www.cnn.com
This will give you, for example, JSON or an HTML representation of how FB sees the page.
Is there a way to use the standard facepile social plugin but have it render in German? I need it to read in German for a site I am finishing, but I don't see anywhere in the documentation that points to any kind of internationalization... I was thinking I might try to rebuild it in German but I can't apparently make a call to get all the fans for a fan page (you can only check against one user id at a time for me())
Anyone know if there are any language options for the social plugins?
Maybe you find something useful there: http://developers.facebook.com/docs/internationalization/
Simply said (if you are using JavaScript SDK) you can use the german translated strings if you just integrate their .js in this way:
<script src="//connect.facebook.net/de_DE/all.js"></script>