Facebook Open Graph object as a string not a url

334 views
Skip to first unread message

playroom-dev

unread,
Mar 23, 2012, 1:40:34 AM3/23/12
to facebook-actionscript-api
Does the open graph object have to be a URL of a web page??

I have an Flex/AIR mobile project and I have my Facebook Open graph
app with action of watch and object movie.

I can successfully 'Add to Timeline' by passing in say a url to a
movie title on imdb as they have a url with the correct meta tags for
open graph:

/*
var params:Object = new Object()
params.movie ="http://www.imdb.com/title/tt0401792/";
params.action_token = fbToken;
FacebookMobile.api("/me/
video.watches",onAddToTimelineUpdateStatus,params,"POST");
*/

Can I construct my object on the fly and send them without have to
make a html page with those metatags?

/*
var myCustomMovieObject:Object = new Object();
myCustomMovieObject.type = "video.movie";
myCustomMovieObject.title = "Some Movie Yeah";
myCustomMovieObject.image = "http://ia.media-imdb.com/images/M/
MV5BMTk5OTY4MDQ2OV5BMl5BanBnXkFtZTcwMjU1MDYxNw@@._V1._SX94_SY140_.jpg";
var params:Object = new Object()
params.movie =myCustomMovieObject;
params.app_id =fbAppID;
params.action_token = fbToken;
FacebookMobile.api("/me/
video.watches",onAddToTimelineUpdateStatus,params,"POST");
*/

I get the error "(#3502) Object at URL [object Object] has og:type of
'website'. The property 'movie' requires an object of og:type
'video.movie'. "

Any ideas?

Thanks

Andrew Kenward

unread,
Mar 25, 2012, 6:17:19 PM3/25/12
to facebook-act...@googlegroups.com
As far as i know Facebook needs a live url to query for the object your user is interacting with. So you need to have the meta tags for open graph in the head of that page.

I am currently working on something with facebook open graph and plan to use a php page that takes in unique ids then generates a page on the fly from a database of data. Seems the only way at the moment to use open graph and timeline actions.

Open graph is all about actual objects on the web. So it needs a unique page/url per object you want to interact with. Check out pinterest.com and facebooks blog post about it

playroom-dev

unread,
Mar 26, 2012, 9:17:55 PM3/26/12
to facebook-actionscript-api
Thanks Andrew that makes sense, much appreciated.

On Mar 26, 9:17 am, Andrew Kenward <andykenw...@gmail.com> wrote:
> As far as i know Facebook needs a live url to query for the object your
> user is interacting with. So you need to have the meta tags for open graph
> in the head of that page.
>
> I am currently working on something with facebook open graph and plan to
> use a php page that takes in unique ids then generates a page on the fly
> from a database of data. Seems the only way at the moment to use open graph
> and timeline actions.
>
> Open graph is all about actual objects on the web. So it needs a unique
> page/url per object you want to interact with. Check out pinterest.com and
> facebooks blog post about it
>
> http://developers.facebook.com/blog/post/2012/02/17/developer-spotlig...
>
>
>
>
>
>
>
> On Friday, 23 March 2012 05:40:34 UTC, playroom-dev wrote:
>
> > Does the open graph object have to be a URL of a web page??
>
> > I have an Flex/AIR mobile project and I have my Facebook Open graph
> > app with action of watch and object movie.
>
> > I can successfully 'Add to Timeline' by passing in say a url to a
> > movie title on imdb as they have a url with the correct meta tags for
> > open graph:
>
> > /*
> > var params:Object = new Object()
> > params.movie ="http://www.imdb.com/title/​tt0401792/<http://www.imdb.com/title/tt0401792/>";
>
> > params.action_token = fbToken;
> > FacebookMobile.api("/me/
> > video.watches",​onAddToTimelineUpdateStatus,​params,"POST");
> > */
>
> > Can I construct my object on the fly and send them without have to
> > make a html page with those metatags?
>
> > /*
> > var myCustomMovieObject:Object = new Object();
> > myCustomMovieObject.type = "video.movie";
> > myCustomMovieObject.title = "Some Movie Yeah";
> > myCustomMovieObject.image = "http://ia.media-imdb.com/​images/M/<http://ia.media-imdb.com/images/M/>

burak celen

unread,
Mar 22, 2013, 12:17:07 PM3/22/13
to facebook-act...@googlegroups.com, magnusm...@gmail.com
Did you solve your problem? I have the same issue. I am using facebook-actionscript-api.

I find some solution like http://stackoverflow.com/questions/8431694/dynamic-generation-of-facebook-open-graph-meta-tags but i don't do it by using action script.

Thanks.

23 Mart 2012 Cuma 07:40:34 UTC+2 tarihinde playroom-dev yazdı:
Reply all
Reply to author
Forward
0 new messages