Active
Project:
Drupal for Facebook
Version:
6.x-2.0-rc2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 May 2010 at 18:50 UTC
Updated:
21 Jul 2010 at 19:41 UTC
Using your sample code as a start, I have just about got a fully-Drupalized version. If you are interested in my contributing it back, I'd be happy to.
One question though. In the sample, you have if (isset($GLOBALS['fb']) && fb_facebook_user()). On my site, the global is indeed set, but "fb_facebook_user" is returning null. I cannot locate that function (it was late when I was looking). What is that supposed to do? I know I was logged into FB at the time I was testing.
Comments
Comment #1
nancydruExcuse me, it is actually
$fb->get_loggedin_userthat I cannot find.Looking at the comments I would think I don't need that since I am using the stream method.
Comment #2
summit commentedSubscribing, interested in Drupal-Facebook.
Nancy, great if you contribute your code. Can look into it than!
greetings, Martijn
Comment #3
nancydruSee also: #778314: How to add FB publishing options to nodes?.
Comment #4
Dave Cohen commentedget_loggedin_user is part of facebook's php sdk. In the version for DFF 2.0, at least. In the newer php sdk (DFF 3.x), that function no longer exists.
Comment #5
nancydruWell, it appears to not know who I am, even though I am logged into FB on another tab. Do I need to provide it with a FB ID?
Comment #6
Dave Cohen commentedIt should return your facebook id, only if you've authorized the app.
Comment #7
nancydruHow do I authorize the app if it has never tried to publish?
This will not work if the 400 users are individually going to have to pre-authorize an app so that they can post. It would probably be okay on their first attempt at posting.
Comment #8
Dave Cohen commentedAuthorizing the app is what happens when user clicks the facebook connect button.
You might be more interested in a share button or a like button. You can have either of those without a full-fledged application that the user has to authorize.
Comment #9
nancydruThere is already a share button for several social sites, including Facebook. What they are looking for is a check box that they can check during node creation that will automatically publish the node (or not, as they choose). These people are quite lazy; they don't want to create and node and then share.
I haven't even seen a Connect button...
Comment #10
nancydruThe only "Connect" setting I see is "Add to login form," which we don't use. Our login comes from the main site (we are on a sub-domain) and happens under the covers.
Comment #11
Dave Cohen commentedI think you're trying to do something that can only be done with an application. And possibly only with the write to stream extended permission (writing with no dialog ever appearing).
You should read up on http://developers.facebook.com/ about their APIs and what is possible. If it is possible, hopefully Drupal for Facebook can make it easier to implement.
Comment #12
nancydruOkay. I thought maybe that sample code in the documentation was supposed to be close to what I wanted. I have thought about just redirecting to the equivalent of the "Share" link.
I don't mind making them go through that FB authorization the first time they post, but to ask them to pre-authorize is something that I think just won't happen. These people can be very lazy and very arrogant.
Comment #13
WildBill commented"I don't mind making them go through that FB authorization the first time they post, but to ask them to pre-authorize is something that I think just won't happen. These people can be very lazy and very arrogant."
Those are the same thing. Doing the FB authorization the first time is the same as authorizing the app.
Comment #14
nancydruThat's fine with me; FB users should be pretty much used to doing that. I got the feeling from Dave that there was some process they would have to go through before they could try to post.
So, I think the big hurdle I have now is linking my Drupal user to his/her FB user. Logging in through FB is out of the question.
Comment #15
BMorse commentedWe've been trying to get this to work on a test site. We have FB Connect button on login and there is a Share on Facebook checkbox on the node creation. But it doesn't actually seem to post to the user's stream. Anyone get this working?
Comment #16
nancydruThere is working code in #778314: How to add FB publishing options to nodes?.
Comment #17
BMorse commentedRequires the 3.x dev version I assume as it's in that thread. But when we installed that version we got an error for the whole site.