Prashant Singh
Prashant Singh

Reputation: 3793

defining object types in open graph for facebook application

I wish to develop an application(facebook) which can publish the current actions of user on my website to his timeline.

Currently , I am able to post updates , but they are not dynamic. I mean I am unable to post the exact price and product name as searched by our user.

I will explain a bit through an example picenter image description here

I have set two custom properties Product:prodname and Product:price thinking that it will help me in sending the actual product user has searched and the price of the result he had obtained.

Now, I wish the preview to accept 2 variables prodname and price.

Am I on the right path ? Because facebook is not accepting the singular noun I submitted !

Please suggest and comment, if I am unclear in my question !!

Upvotes: 0

Views: 632

Answers (2)

Prashant Singh
Prashant Singh

Reputation: 3793

I resolved my problem. The mistake I was doing was that I was setting custom properties to the product(object). However, actually, we need to add custom properties to the compare(action) instead. Finally we need to send the value of the custom properties to the open graph. Just concat it with the open graph url.

Here is a pic explaining the same :-

enter image description here

Snapshot of the page defining the object :-

enter image description here

Snapshot of the part defining the object preview:-

enter image description here

and then the final desired result :-

enter image description here

Upvotes: 1

phwd
phwd

Reputation: 19995

I don't think the Open Graph supports adding custom properties like that.

You should edit the Preview object to fill out the data or using an existing Product object url.

Upvotes: 0

Related Questions