Is there any documentation available for the 7.x branch of fb_graph.module ? I enabled the module, and the only element I was able to hunt down is one setting at admin/structure/types/manage/[node-type] which doesn't seem to do anything.

What are the steps needed to get the og:title og:image og:type showing up in the pages?

CommentFileSizeAuthor
#3 fb_graph.module.zip4.63 KBmottolini

Comments

Dave Cohen’s picture

Title: fb_graph.module documentation » fb_graph.module support in D7
Component: Documentation » Code
Category: support » task

It would be awesome if someone contributed doc!

The module has several helper functions which basically work already. I.e. in your custom module's hook:

fb_graph_set_tag('og:type', 'article');

Unfortunately the higher level stuff is broken, because there's a bunch of code in fb_graph_nodeapi(), which is a D6 hook and that code needs to be moved into the corresponding D7 hooks. It's not too hard, I just haven't needed to do it yet. Anyone want to take a stab and submit a patch?

When it works, you'll be able to say for example, "all drupal stories are open graph articles", or you'll be able to make a vocabulary called 'og:type' with your app-specific list of types. Things like og:title should work automatically for nodes.

Slovak’s picture

Appreciate the module and the tools that come with it, for sure. Had to run through a few iterations to get FB Connect working properly, will add my experience to the doc for D7.

I wasn't sure if I was missing anything regarding og. Found helpful snippets at http://www.drupalforfacebook.org/node/2630

I ended up adding some metatags and variables to html.tpl.php for now.

mottolini’s picture

Version: 7.x-3.3-beta1 » 7.x-3.3-beta6
Priority: Normal » Major
StatusFileSize
new4.63 KB

Open Graph Tags are not generated with this module because porting from D6 was not completed.
So I did it myself, see code attached here.
I didn't submit a patch because it's not completed yet, but it's better than nothing.
First you have to enable a content type Open Graph, then you can enable any field in the bundle to act as a open graph property.
I'm not happy where the open graph settings appear in the field settings form, so if anybody could suggest how to place it better, while mantaining the automatic settings management of the field apis, is appreciated.

Dave Cohen’s picture

Title: fb_graph.module support in D7 » fb_graph.module upgrade to D7
Version: 7.x-3.3-beta6 » 7.x-3.x-dev
Issue tags: +get involved

Obviously, patches are better than .zip files to work with.

I'm not sure I understand your description, where you enable a content type Open Graph. It should be that any content type can have any number of open graph tags.

The D6 version allows any taxonomy term to also serve as an open graph tag, and I think supporting that in D7 is a great start. Any patch that helps upgrade fb_graph.module to D7 is welcome. Pulling any chunk of fb_graph_nodeapi() out of that function and into it's D7 equivalent would help.