News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SA Facebook Integration

Started by SMFHacks.com Team, February 12, 2010, 01:36:11 PM

Previous topic - Next topic

nfh

Well, nevermind about what I said about the "Publish" link... I was expecting to have it posting on my Facebook page, but posts were made on my Timeline. I got a bunch of them over my Timeline during some trial tests :).

Nonetheless, I can't get the automatic posting to work. Did you do anything special to solve it?

distante

Just what SA said, changed to profile, save, and change back to page and save.

nfh

Well, I guess I did that in the meantime, although unaware of it, because it is working again  ???.

Another issue: I noticed that Facebook debug tool [nofollow] is complaining about the "Like" button:

QuoteLike Button Warnings That Should Be Fixed
Admins And App ID Missing:   fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high clickthrough rate.

As a matter of fact, the Like button doesn't seem to communicate with Facebook, as no Like is generated on my FB profile and as soon as I reload my SMF forum topic page, the Like button goes back to its original state (clicable and without the like count).

distante

You have to fill the fb admin Id in the facebook administrator panel in your forum

trekkie2444

#2444
Still getting the same error...anyone? Interestingly when I test it out, it works fine...but the error keeps popping up.

SA™

Quote from: distante on March 15, 2012, 05:43:15 PM
SA™ the publish don't will be retrieve any img now? like this:



Just the main image (the one defined in the admin page? )

(off topic, that image is for a topic about a girls selling her farts in ebay :S )

what one? auto or button??????????????????????

Quote from: nfh on March 15, 2012, 06:58:19 PM
Well, I guess I did that in the meantime, although unaware of it, because it is working again  ???.

Another issue: I noticed that Facebook debug tool is complaining about the "Like" button:

QuoteLike Button Warnings That Should Be Fixed
Admins And App ID Missing:   fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high clickthrough rate.

As a matter of fact, the Like button doesn't seem to communicate with Facebook, as no Like is generated on my FB profile and as soon as I reload my SMF forum topic page, the Like button goes back to its original state (clicable and without the like count).

facebook chnaged the og tags

sources/facebook/facebookhooks.php

$open_graph = '
<meta property="og:type" content="article" />
<meta property="og:image" content="'.(!empty($modSettings['fb_app_image']) ? $modSettings['fb_app_image'] : $settings['default_theme_url'].'/images/topic/veryhot_post.gif').'" />
<meta property="og:site_name" content="'.$context['forum_name'].'" />
<meta property="og:title" content="'.$context['page_title_html_safe']. '" />
  <meta property="fb:admins" content="'.(!empty($modSettings['fb_app_admin']) ? $modSettings['fb_app_admin'] : '').'" />
<meta property="og:url" content="'.(empty($context['current_topic']) ? $scripturl : $scripturl .'?topic='.$context['current_topic'].'.0').'" />';


replace with

$open_graph = '
    <meta property="fb:app_id" content="'.$modSettings['fb_app_id'].'" />
                <meta property="og:type" content="article" />
<meta property="og:locale" content="'.(empty($modSettings['fb_admin_intern1']) ? $modSettings['fb_admin_intern1'] : 'en_US').'" />
                <meta property="og:title" content="'.$context['page_title_html_safe']. '" />
                <meta property="og:image" content="'.(!empty($modSettings['fb_app_image']) ? $modSettings['fb_app_image'] : $settings['default_theme_url'].'/images/topic/veryhot_post.gif').'" />
                <meta property="og:description" content="'.$context['page_title_html_safe'].'" />
                <meta property="og:url" content="'.(empty($context['current_topic']) ? $scripturl : $scripturl .'?topic='.$context['current_topic'].'.0').'" />';


Quote from: trekkie2444 on March 15, 2012, 07:45:53 PM
Still getting the same error...anyone? Interestingly when I test it out, it works fine...but the error keeps popping up.

sound like it hasnt uninstalled and or installed properly pls try a manual install
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

distante

Quote from: SA™ on March 16, 2012, 12:16:15 AM
Quote from: distante on March 15, 2012, 05:43:15 PM
SA™ the publish don't will be retrieve any img now? like this:



Just the main image (the one defined in the admin page? )

(off topic, that image is for a topic about a girls selling her farts in ebay :S )

what one? auto or button??????????????????????

Auto (also will be great if the button catch the img if is avariable)

SA™

currently not pissible with the button as that is a different setup but the auto pub should grab the first image i the post and use that
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

distante

Ah ok!
I will try to find how to catch the ILA image before update

Skyflash

#2449
Quote from: SA™ on March 15, 2012, 05:15:59 PM
new version added

added user name to replys posted on facebook [thanks distante]
fixed issue the page *topic* can't be found with comments error [thanks distante]
publisher now removes ila tags
publishe button now uses the image specyfied in fb admin for og tags
fixed hardcoded text
Great! But... another little problem :)
I have the Share This Topic Mod too, and the text your plugin grabs during the Publishing process, is execessive and includes part of jQuery code used by the other mod :)

Share This buttons are placed "Above" the post, placed immediatly below your Publish button. If i place Share This buttons BELOW the post, your mod grabs the correct text

SA™

hmm i dont think there is much i can do about this as this is the way the share this mod is coded it injects the share this stuff into the  $message['body'] var
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Skyflash

Quote from: SA™ on March 16, 2012, 03:53:47 AM
hmm i dont think there is much i can do about this as this is the way the share this mod is coded it injects the share this stuff into the  $message['body'] var
Ok, no problem. Share This mod uninstalled :)

Skyflash

Quote from: SA™ on March 15, 2012, 05:15:59 PM
new version added
publishe button now uses the image specyfied in fb admin for og tags
Tried this function and i confirm it works :)

Only a little question, for future releases: is possible to extend this functionality to the auto publishing function too? Now, the auto publishing still using an icon grabbed in the board, not the default og:image set in preferences.

Other related question: as many fb publishing plugins for Wordpress, can you set the autopublishing (or the publish button) for grabbing first image attached to the post or, if there's no image, the og:image set?

distante

#2453
SA I'm having problem with other forum with the autopost in page (with the latest version)

Since I have a ú in my forum title; "Música y Sonido" is been posted in facebook in this way: "distante posted a new topic : Música y Sonido"

I tried change this

$mes = $user_info['name'].' '.$txt['fb_postpostt'].' '.htmlspecialchars($context['forum_name']).'';


for$mes = $user_info['name'].' '.$txt['fb_postpostt'].' '.$context['forum_name'].'';

in the public static function Facebook_Post_topic() function, but nothing :(

I deleted all reference to forum_name until find the fix.

In the other hand, I don't know why but the "Facebook Access Tokens" isn't filled fully. just 2 of the 3 fields are filled, the last one is empty. The autopublic of new topics is working, but no the topic responses

And Finally, I want to remove the "login with facebook" that shows in the regular login box, how can I do this? see: www.musicaysonido.com/foro/

I have it duplicated.

SA™

Quote from: Skyflash on March 16, 2012, 08:19:54 AM
Quote from: SA™ on March 15, 2012, 05:15:59 PM
new version added
publishe button now uses the image specyfied in fb admin for og tags
Tried this function and i confirm it works :)

Only a little question, for future releases: is possible to extend this functionality to the auto publishing function too? Now, the auto publishing still using an icon grabbed in the board, not the default og:image set in preferences.

Other related question: as many fb publishing plugins for Wordpress, can you set the autopublishing (or the publish button) for grabbing first image attached to the post or, if there's no image, the og:image set?

this is the way it is etup it looks for an image in the post if it finds one it uses it if not it ses the topic icon instead will chnage thisin the next version to use the og image if none found in the piost

QuoteIn the other hand, I don't know why but the "Facebook Access Tokens" isn't filled fully. just 2 of the 3 fields are filled, the last one is empty. The autopublic of new topics is working, but no the topic responses
yea there is a bug in that now ill rease a new version later with a few fixes

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

distante

great, If I can help in something give a yell

Skyflash

Quote from: SA™ on March 16, 2012, 02:53:02 PM
Quote from: Skyflash on March 16, 2012, 08:19:54 AM
Only a little question, for future releases: is possible to extend this functionality to the auto publishing function too? Now, the auto publishing still using an icon grabbed in the board, not the default og:image set in preferences.

Other related question: as many fb publishing plugins for Wordpress, can you set the autopublishing (or the publish button) for grabbing first image attached to the post or, if there's no image, the og:image set?

this is the way it is etup it looks for an image in the post if it finds one it uses it if not it ses the topic icon instead will chnage thisin the next version to use the og image if none found in the piost
I'm sorry, but it seems don't work :)
I.e.: http://www.doaitalia.it/primi-passi/alleanze-e-gradi-t44.0.html
First image embedded (using ILA mod) in post, is this: http://www.doaitalia.it/index.php?action=dlattach;topic=44.0;attach=127;image

But the autopublishing function published that: http://www.facebook.com/doaitalia/posts/319692581418288
Look the image, that isn't the first embedded image, but one of standard "topic-related" images

Using the Publish button, instead the auto publishing function, the result is better. Image is standard og:image defined in your mod preferences, and more text is grabbed: http://www.facebook.com/doaitalia/posts/368481823173944

distante

I think the Facebook mod don't catch ILA images yet

SA™

correct it only catches  images in the img tags it a bit harder to catch the images from attachments and ila tags
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

SA™

new version added

Quoteupdated open grath tag tags
bought the auto login setting to admin panel to enable disable featrue
fixed more hardcoded text
fixed issue with publisher reply tokens[now requires user to save the pub settings before granting permissions to get set the session var to be able to get the access tokens]
fixed error htmlentities() Invalid multibyte sequence in argument
publisher use ogtag for image now if no image in post
added checcks for valide local set in admin
added sceduled task to try and ensure fb tokens dont expire [runs every hour ca be changed in admin sceduled task]
added support for auto registration can be set in admin>facebook>registration method> AUTO or MANUAL

i did start playing with the attachment images but it seems it not possible todo so facebook doesnt seem to like image like
http://site.com/index.php?action=dlattach;topic=58.0;attach=82;image wich is a shame realy :( there maybe a way around it but ill have todo more digging the mod is still  setup up todo this tho [commented out in fb hooks file] just need to find a way around that
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Advertisement: