Open Graph product.list object - facebook

In my application I've got products and sets of products.
As I found on Facebook Open Graph documentation, there are two similar to mine og types:
Set: https://developers.facebook.com/docs/reference/opengraph/object-type/product.group/
Set element (product): https://developers.facebook.com/docs/reference/opengraph/object-type/product.item/
I tried to describe my application sub-page as one of above og types by placing meta tags:
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# product: http://ogp.me/ns/product#">
<meta property="fb:app_id" content="xxx" />
<meta property="og:type" content="product" />
<meta property="og:url" content="my url" />
<meta property="og:title" content="my title" />
<meta property="og:image" content="my thumb" />
<meta property="og:site_name" content="my sitename" />
<meta property="product:price:amount" content="my price" />
Facebook Open Graph debugger recognizes my url as product. But I do not know can I link product to product.group.
I would like to achieve scenario that user may like group of products (product.group including many og types product.item). I've got url: /list/1 and when someone like/share the list, I want to present it nicely on user timeline.

Related

Proper Subscription Product Configuration

I am implementing a subscription product within facebook payments. Their documentation shows the example subscription definition file (hosted on my domain) is as follows.
<html>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# fbpayment: http://ogp.me/ns/fb/fbpayment#">
<meta property="og:type" content="fbpayment:subscription" />
<meta property="og:title" content="My Subscription Product" />
<meta property="og:image" content="https://myurl.com/myimage.png" />
<meta property="og:description" content="The Best bronze subscription around!" />
<meta property="fbpayment:price" content="5.99 USD" />
<meta property="fbpayment:alternate_price" content="3.99 EUR" />
<meta property="fbpayment:alternate_price" content="3.99 GBP" />
<meta property="fbpayment:trial_duration" content="7 days" />
<meta property="fbpayment:billing_period" content="1 week" />
<meta property="fb:app_id" content="214417841952278" />
<meta property="og:url" content="https://myurl.com/myproductdefinitionfile.html" />
...
I put this verbatum into my subscription file. Then I updated the image, the app id, and the url. I've also tried to remove the ... and add closing tags as would be expected in a parsable file. I then tested purchasing this subscription using their example code.
var obj = {
method: 'pay',
action: 'create_subscription',
product: 'https://myurl.com/myproductdefinitionfile.html'
};
FB.ui(obj, js_callback);
I get this error:
Couldn't Complete Purchase
I then tried very many things to get it working. I even used facebook's own url scraping debugger (https://developers.facebook.com/tools/debug/) which says my file is proper. Still getting the above error.
My question: Does anyone have an example working subscription definition file?

Facebook open graph og:image viewed by facebook but not displayed

I have read quite a number of SO post on the topic however my problem still persists : Facebook sees my meta tags as raw tag found but does not display or include image during the open graph display. This is the Url i am trying to post on facebook :
https://holyunions.com/govt-releases-gh-cent-465-million-for-start-of-one-district-one-factory-project-general-language-en-article-118
And This is my output of my code
<meta property="og:title" content="Govt releases GH¢465 million for start of one-district-one factory project - General :. Twum Barimah" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://holyunions.com/govt-releases-gh-cent-465-million-for-start-of-one-district-one-factory-project-general-language-en-article-118" />
<meta property="og:description" content=""/>
<meta property="fb:app_id" content="532235306919626"/>
<meta property="og:image" content="http://holyunions.com/js/max_john_richeditor/lib/tiny_mce/plugins/openmanager/uploads/images/image_11_04_2017_12_24_02_1491913442-42.png" />
<meta property="og:image:secure_url" content="https://holyunions.com/js/max_john_richeditor/lib/tiny_mce/plugins/openmanager/uploads/images/image_11_04_2017_12_24_02_1491913442-42.png" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="285" />
<meta property="og:site_name" content="Holy Unions : Home of Marriages" />
<meta property="fb:admins" content="100004005747278"/>
The og image properties are well defined however Facebook after displaying them as tags, still does not fetch the image neither does it display the image nor the description in the open graph properties.
How do I display the image that facebook sees as url ?

Facebook app product localization

Hi I am trying to implement localization for each of my facebook products which can be purchased through a game app inside the facebook canvas. The problem is the documentation does not cover localizing strings which are specifically the title and description of the product.
In one of my product htmls which is scraped by facebook I have this.
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<meta property="og:type" content="og:product" />
<meta property="og:locale" content="en_US"/>
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="es_ES" />
<meta property="og:title" content="tokens.small" />
<meta property="og:plural_title" content="Small Coins" />
<meta property="og:description" content="10,000 coins" />
<meta property="og:image" content=<img url> />
<meta property="product:price:amount" content="0.99"/>
<meta property="product:price:currency" content="USD"/>
<meta property="product:price:amount" content="1.29"/>
<meta property="product:price:currency" content="NZD"/>
</head>
How / where would I declare the strings to be used for fr_FR in terms of title and description. Thanks and appreciate any help.
You are using static prices. Instead you could use dynamic prices, so when Facebook asks your server for product price, in the json response you add additionally fields 'title' and 'description' based on user locale.

How to publish playlists on facebook timeline?

I'm trying to figure out how to publish "playlist styled" posts on Facebook timeline with list of songs (like Spotify does)? We have web pages representing playlists and the pages marked with "open graph" like this:
<meta property="og:type" content="music.playlist"
<meta property="og:url" content="playlist url">
<meta property="og:title" content="playlist name">
<meta property="og:description" content="description">
<meta property="og:image" content="image url">
<meta property="music:song" content="song-url-1"
<meta property="music:song" content="song-url-2">
<meta property="music:song" content="song-url-3">
<meta property="music:song" content="song-url-4">
However, facebook does not show the list of song. There are just title, description and image appear.
Thanks!
You can create a playlist via
POST /me/music.playlists
See https://developers.facebook.com/docs/reference/opengraph/action-type/music.playlists
According to https://developers.facebook.com/docs/reference/opengraph/object-type/music.playlist/ the structure of a playlist should be
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# music: http://ogp.me/ns/music#">
<meta property="fb:app_id" content="302184056577324" />
<meta property="og:type" content="music.playlist" />
<meta property="og:url" content="Put your own URL to the object here" />
<meta property="og:title" content="Sample Music Playlist" />
<meta property="og:image" content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" />
<meta property="music:song:url" content="Sample Song: URL" />
</head>
Have a look at music:song:url, you're using music:song only! But I'm not sure if you can create a playlist at all, because https://developers.facebook.com/docs/opengraph/guides/music.playlists/#requirements states that
In order to access the Create Playlist action, you must have the appropriate relationships in place with rights owners. We are currently not accepting any new submissions for the Create Playlist action.

Open Graph - Facebook share

I use Open Graph tags to share the site. On the desktop does't have problem, but if I use a mobile device is not working properly. Do not take my description and picture. Anyone had any similar problem? How to become equally to both (mobile and desktop) ?
Here is my OG meta tags:
<meta property="og:url" content="http://www.mywebsite.com" />
<meta property="og:site_name" content="MyWebSite" />
<meta property="og:image" content="http://www.mywebsite.com/images/image1.jpg" />
<meta property="og:type" content="website" />
<meta property="og:title" content="My web site" />
<meta property="og:description" content="My description !" />
Try adding ?fbrefresh=ANY_RANDOM_NUMBER after your URL.
Like this :
<meta property="og:url" content="http://www.mywebsite.com?fbrefresh=9999" />
you need to use link for og:url not a meta tag
<link property:"og:url" content="http://www.mywebsite.com?fbrefresh=9999">