Active
Project:
Drupal for Facebook
Version:
6.x-3.x-dev
Component:
Documentation
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Oct 2010 at 10:12 UTC
Updated:
25 Sep 2012 at 12:34 UTC
Hey,
This is probably really stupid question, sorry. I have searched this forum and hunted on the drupalforfacebook site, though.
I installed this module last week and am quite new to some of the facebook terminology. I started with a basic 'like' button - no problem. I am now interested to know whether I can pull in the News feed from our Facebook fan page on our Drupal website. Is this possible? Our fan page is publicly visible, is it necessary go through the whole API key step? (i am not the facebook user that 'owns' the fan page).
I am going to keep hunting around, if I figure anything out I will post it here.
Comments
Comment #1
Dave Cohen commentedYou need to create an application, and the owner of that page needs to authorize the application. Including an extended permission to read the stream.
Look up stream api on facebook's doc.
Comment #2
AndyThornton commentedHi Dave,
Cheers for the response.
I have used the "" tag and that has placed the content of our fan page wall on our site. It was very simple (when I found the tag!), and I did not need to authorize the application for this. I am not certain whether this will ultimately be too crude, though. I am still feeling my way to understanding the relative pros and cons of approaches.
Do I only get away with this because the fan page is public? If you or anyone else has any thoughts on the pros and cons I'd appreciate hearing them (as I imagine would anyone else who stumbles over this post).
Thanks again,
Andy
Comment #3
Dave Cohen commentedcan't read what you posted. Try using
<code>.Comment #4
AndyThornton commentedsorry.
should have read:
I have used the
"<fb:fan>"tag and that has placed the content of our fan page wall on our site. It was very simple (when I found the tag!), and I did not need to authorize the application for this. I am not certain whether this will ultimately be too crude, though. I am still feeling my way to understanding the relative pros and cons of approaches.Do I only get away with this because the fan page is public? If you or anyone else has any thoughts on the pros and cons I'd appreciate hearing them (as I imagine would anyone else who stumbles over this post).
Comment #5
Dave Cohen commentedFacebook's documentation is so lame, I can't find anything about fb:fan on http://developers.facebook.com/docs/reference/fbml/
Please enlighten us.
Comment #6
AndyThornton commentedHey Dave,
I guess I got lucky somehow, sorry I would have put more details but I always assumed I am behind the game on this stuff. I cannot quite remember the entire path that got me to finding that tag but here are a couple of pages that helped:
http://www.vbteam.info/vb-4-0-addons-and-template-modifications/49983-xfbml-facebook-like-box.html
Then from the console page:
http://developers.facebook.com/tools/console/
I clicked 'Examples' and found the fb:fan tag example code
Cheers,
Andy
Comment #7
hkirsman commentedHere's a module for this (D7):
http://drupal.org/sandbox/hkirsman/1786610
It creates block for fanbox. You can even theme it because fb:fan tag allows including css file!
At first fb_fan was stand-alone module but I figured out that I can use fb_app and fb_connect to do the connection part.
I need help on integrating fb_fan into fb as I know little about it.
Currently I would need discussion on config path and how the configuration should work:
1) Is the configuration path ok? Should it be under fb config path?
2) What about multiple fanboxes for different languages? Should config be in the block not on separate page? Maby list them under fb (admin/structure/fb) like apps but on different tab (this would need blocks to be created dynamically - possible?)?
3) Am I using fb, fb_app and fb_connect correctly? It all fell into place too easily. :)
Comment #8
Dave Cohen commentedYou mean the drupal menu path? You can use FB_PATH_ADMIN as a prefix. See how fb_menu() uses both FB_PATH_ADMIN and FB_PATH_ADMIN_ARGS. Or, use FB_PATH_ADMIN_APPS as a prefix for app-specific settings.
Possibly all your configuration could be in the block config? I.e. not even implement hook_menu()?
I don't exactly know the right approach for languages. I know it's possible to dynamically offer more blocks (i.e. fb_connect offers one block per app). However I suspect for languages each block should figure out language for the current user. I'm not expert on i18n.
You could certainly have a setting like, "How many blocks should this module provide?" Where an admin could increase the number if they have several fan_profile_id values.
It's certainly supposed to be easy. :)
I took a look at http://drupalcode.org/sandbox/hkirsman/1786610.git/tree/refs/heads/7.x-1.x, am I looking at the right thing? The code looks like you're not yet relying on modules/fb. For sure you should not be initializing the facebook javascript. Let modules/fb do that.
Comment #9
hkirsman commented1) I'll try to implement it on FB_PATH_ADMIN . '/fb_fan then. All things in the same place!
2) I'm going to allow people to add n+1 fanboxes. These are then listed at the blocks page. Some websites can have multiple facebook pages, probably for different languages.
3) Yes, that's the right code. It's not initializing js. There's only one line of js and it's commented out.
//$content .= '<script type="text/javascript">FB.init("' . $api_key . '");</script>';Did you mean something else?
Comment #10
hkirsman commentedhttps://github.com/hkirsman/fb_fan/tree/merge_with_fb (for D7)
Install instructions here: http://drupal.org/sandbox/hkirsman/1786610
I've done most of the important stuff and it works! :) Global settings are under admin/structure/fb/settings. Rest of the features are under List Fan Boxes and Add Fan Box tabs.
Somebody want to give it a try?
I still need to write README.txt and maby some other help. Depends how well people get it working.
Comment #11
hkirsman commentedDave, I know you're very busy but I'll appreciate if you can at some point check out my FB Themeable Fan Box module. See comment #10
Thank you! :)