Topic-icon Post Message

Active Subscriptions:

None
12 years 3 months ago #41592 by Ivan
Post Message was created by Ivan
I just installed the newest version of JFBConnect, created a new app and tried to post a message to users wall. This is not working. On my other apps I dont recall enabling any extended permissions to post to a users wall. Do you know if anything has changed? I get a null return value with no error.
The topic has been locked.
Support Specialist
12 years 3 months ago #41597 by alzander
Replied by alzander on topic Post Message
You always have to have the "status_update" permission from your user to post on their behalf. That's requested by JFBConnect automatically if you have a profile plugin configured to push status updates for them. Otherwise, you'd want to add it to the Additional Permissions Request box in the Configuration -> Facebook area of JFBC. You can add it there anyways just to be certain, it doesn't hurt if you know you need that permission.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #41651 by Ivan
Replied by Ivan on topic Post Message
Hi Alex,

I don't have any social plugins installed. I am trying to customize jcomments to post to the users status.

I basically call it like this:
    $fbLibrary = JFBCFactory::provider('facebook');
    $fbUserId = $fbLibrary->getMappedUserId(); 

    if($fbUserId)
    {
    $fbLibrary->setFacebookMessage($htmlText);
    }

But its not posting even though i have status_update in the backend Additional Permissions Request

Im assuming it needs a plugin to post?

Ivan
The topic has been locked.
Support Specialist
12 years 3 months ago #41661 by alzander
Replied by alzander on topic Post Message
No, you shouldn't need a plugin loaded. That can request the status_update permission for you, but if you've set it in the Additional Permissions Request box it will always be requested from any of your users.

Can you turn the "Enable Debugging" setting on in JFBConnect and test again. A system message should show you any error messages that are returned by Facebook when you try to post on their behalf. Let us know what that is (or if you don't see one, let us know that).

The rest of your code looks correct. You may want to check that the getMappedUserId is returning a proper value though, just in case.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #41676 by Ivan
Replied by Ivan on topic Post Message
Hi Can you check ur inbox. Ill send you the url to the page.
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #41724 by Ivan
Replied by Ivan on topic Post Message
Did you get a chance to look at the website I inboxed the URL
The topic has been locked.
Support Specialist
12 years 3 months ago #41738 by alzander
Replied by alzander on topic Post Message
I did receive the PM and just had a chance to take a look and test.

First, there's something else adding the Facebook Javascript library code to your page right after the opening body tag. It looks like:
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
That should be removed, though I don't think that's the problem.

As for why the post isn't working, I'd recommend a little debugging. Go into the /components/com_jfbconnect/libraries/facebook.php file. Around line 254, you'll see:
if (is_array($message))
                        $response = $this->api('/me/feed', $message);
                    else
                        $response = $this->api('/me/feed', array('message' => $message));
Add:
print_r($response);
exit;
After those lines. Then, you should see the response message from Facebook when the page should reload. If you don't see anything, it means that code isn't executing at all.

Let us know what happens with that, and we'll gladly help however we can.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #41834 by Ivan
Replied by Ivan on topic Post Message
Hi,

Alex,

I installed version 6.1 of JFBConnect and in the Backend I have additional permission request : status_update

I tried the code and its not printing out anything probably because is ajax call. When I do a dump I get a null value. I remove the extra javascript I had when the page renders and still nothing. I did a site error check and everything checks out. I had done this for jcomments using a pervious version of JFBConnect and without putting any status_update permissions I got it to post. In my facebook admin backend all I have is the website configurations and not canvas tabs since that requires SSL. Do you think I need to add this in the facebook backend?

Can you please look at the same url. What other tests can I do?


For profiles I have : No JFBConnect Profile plugins are currently enabled.

Can you please take another look. What other tests can I do?

Ivan
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago - 12 years 3 months ago #41927 by Ivan
Replied by Ivan on topic Post Message
I had to install version 6.0.2 then delete app from settings - apps in facebook then reconnect and I would get the 2 prompts. I also had to have publish_actions in extended permissions
Last edit: 12 years 3 months ago by Ivan.
The topic has been locked.
Support Specialist
12 years 2 months ago #42129 by alzander
Replied by alzander on topic Post Message
Ivan,
Sorry for the delayed response! I'm glad you got things going. You shouldn't have had to delete the app. Facebook won't re-request a permission the user has already granted, so if you weren't seeing the prompt, it should have meant that Facebook already thought that permission was granted. Not sure why it would be necessary to delete, but glad you made some progress.

Should you need anything else, just let me know.

Thanks,
Alex
The topic has been locked.