MyBB Community Forums

Full Version: MyBBPublisher v2.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
try a global replace in my plugin. change $facebook to $mypub_fb or soething else unique and give it another shot.

the error depends on whether is a variable issue in the plugins or a variable issue in the two SDKs we are using
I got a question about the Twitter side of this plugin. As it updates Twitter, there's an extra space between the forum title and "at [bit.ly link]". Example: "[Release 1.4/1.6]MyBBPublisher v1.3.0 | at {bit.ly name}". The | represents the extra space.
Is there a way to remove the extra space between the thread title and link? Also, I want to add "New thread:" to the beginning, like on TwitterFeed.
(2010-10-19, 02:53 PM)pavemen Wrote: [ -> ]try a global replace in my plugin. change $facebook to $mypub_fb or soething else unique and give it another shot.

Changing the name in your plugin didn't work, But, changing the class name in his plugin did, and now both play nice with each other.

Here's what I did:

in the Facebook Connect plugin files, I changed line 77 in facebook.php
from: class Facebook
to: class Facebook_connect.

In fbmain.php I changed line 13
from: $facebook = new Facebook(array(
to: $facebook = new Facebook_connect(array(

I will contact Lennart and let him know of the conflict and how to resolve it, if he is interested in doing so.

Tahnks for the help pavemen!

(2010-10-21, 06:50 AM)Kazuto Wrote: [ -> ]I got a question about the Twitter side of this plugin. As it updates Twitter, there's an extra space between the forum title and "at [bit.ly link]". Example: "[Release 1.4/1.6]MyBBPublisher v1.3.0 | at {bit.ly name}". The | represents the extra space.
Is there a way to remove the extra space between the thread title and link? Also, I want to add "New thread:" to the beginning, like on TwitterFeed.

Edit the included language file to remove the spaces and/or alter the content of the status message

(2010-10-21, 11:48 AM)mark-in-dallas Wrote: [ -> ]
(2010-10-19, 02:53 PM)pavemen Wrote: [ -> ]try a global replace in my plugin. change $facebook to $mypub_fb or soething else unique and give it another shot.

Changing the name in your plugin didn't work, But, changing the class name in his plugin did, and now both play nice with each other.

Here's what I did:

in the Facebook Connect plugin files, I changed line 77 in facebook.php
from: class Facebook
to: class Facebook_connect.

In fbmain.php I changed line 13
from: $facebook = new Facebook(array(
to: $facebook = new Facebook_connect(array(

I will contact Lennart and let him know of the conflict and how to resolve it, if he is interested in doing so.

Tahnks for the help pavemen!

Good to hear. Let me know what Lenart says
To those of you having object# errors, can you verify that you have JSON support enabled?

Go to ACP > Tools & Maintenance > View PHP Info

search the page for a JSON section and make sure that it says 'enabled'
Hey pavemen, I posted on Lennart's site what I did to get the plugins to work together, and he replied that having to facebook classes running at the same time caused a performance hit, which is obviously true, and that he is usinging an official SDK and preferred to keep it as it is.
I will have to talk to him to see what we can do to make things better. However, his plugin runs on every page I assume, at least mine only runs on occasion so it could be worse if someone is using both.
To those with issues generating the one-time token and are getting the FB error message "next is not owned by the application", it appears that FB changed (for the better actually) the way things need to get done. I can only assume they changed something as the process worked for others prior to the other week.

When following the README_Facebook.txt instructions during installation, you need to swap the one-time token and application permissions order in which you perform those actions.

For those having issues, copy/paste the permissions link into your browser and replace the "API_KEY" with your actual API Key. Once you have set the permissions, you can then copy/paste the one-time token link into your browser and again, replace the "API_KEY".

This should let you generate the token.
One of my members just ran into a bug with MyBBPublisher. Apparently, it gives an error pointing to EpiTwitter.php saying that editing the first post of a thread as a duplicate, leading to inability to edit beginning posts.

Here's the thread he made: http://forum.aspiegeek.com/thread-edit-bug
(2010-10-22, 08:59 PM)Kazuto Wrote: [ -> ]One of my members just ran into a bug with MyBBPublisher. Apparently, it gives an error pointing to EpiTwitter.php saying that editing the first post of a thread as a duplicate, leading to inability to edit beginning posts.

Here's the thread he made: http://forum.aspiegeek.com/thread-edit-bug

I am looking into it. To verify, you are using MyBB 1.6 and the latest (1.3.0) of MyBBPublisher?
Its not a problem with the plugin, its a Twitter issue. There appears to continue to be a delay with their status propagation between servers.

See, during an edit, the plugin will search Twitter for a status message with the same Twitter status ID that is stored with the MyBB thread (which was obtained from Twitter when the status was fist posted) and if it finds a matching ID, the plugin will tell Twitter to delete that status update.

The plugin will then post the updated status to Twitter.

However, if you edit the thread too fast, the original status update is not found as it has not propagated to all the servers, or at least the servers used to search status updates. Thus it is not found and not deleted.

The plugin can not verify that the status does not exist since it is possible to manually delete the status from Twitter via Twitter or other Twitter interfaces.

When the plugin tries to post the new status update, its an error since the old one is still present.

So this is my best guess as to why this issue comes up. I have been able to test both Quick and Full edits and sometimes they work, sometimes they don't. Most of the time, when they don't work, its only been a very short while since the original status was posted.

If I wait a few minutes, the edits works fine.

Can you have your member try to edit the post again, now that its been a while?

I need to release version 1.3.1 later today to address the Facebook changes they made, but that is mostly a documentation issue. I will add a bit to not apply Twitter/FB status updates when using Quick Edit, since that does not change subject or URLs anyway
Huh, okay. Thanks for the detailed info. Another question I had was the "one-time token" thing. How do I get that value and what does it do?
the one-time token is used to obtain a long term session id so that mybb does not need to log into facebook each time it wants to post an update. basically it keeps your forum logged into your account.

without it there is no way to have the plugin post to your wall.

follow the readme_facebook.txt file but swap the order of the one-time token and permissions section. do permission step first then the one-time token step.