SA Facebook Integration

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

Previous topic - Next topic

DutchJam

#2780
Quote from: SA™ on August 09, 2012, 11:52:46 PM
yes the page id is the id of the page with out it it dont know where to post topics
assuming this is your page https://www.facebook.com/WeatherConnectionForum the id is
363434477048298

using graph api you can see this info

https://www.facebook.com/WeatherConnectionForum
just chnage the www to graph and you have all the info on your page

Ok, I added my Page ID (numbers) in the field in stead of jamaicaforum.nl (my Facebook page is http://www.facebook.com/jamaicaforum.nl). Maybe this wil solve my problem too...

About the HTML tags, see image below what happens if SA Facebook Integration posts a new topic from my forum to the page at Facebook...

-----
JamaicaForum.nl: http://www.jamaicaforum.nl

SA™

@dutchjam you can try this in facebookhooks.php

$attachment['description'] = $nobbc_body;

replace with

$attachment['description'] = strip_tags($nobbc_body);

@isl30fvi3w
php version?
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 -___-

DutchJam

Quote from: SA™ on August 10, 2012, 02:48:10 PM
@dutchjam you can try this in facebookhooks.php

$attachment['description'] = $nobbc_body;

replace with

$attachment['description'] = strip_tags($nobbc_body);

@isl30fvi3w
php version?


Thanks for your reply SA.

It works, yes and no....

Text in post at facebook page was (like image above):

Usain Bolt zorgt ook voor Twitter-record<br /><br />Niet alleen liep de 25-jarige

And is now:

Usain Bolt zorgt ook voor Twitter-recordNiet alleen liep de 25-jarige

So the HTML tags are gone, but there is no space between the first line and the second line. This would look better:

Usain Bolt zorgt ook voor Twitter-record Niet alleen liep de 25-jarige

Is that possible?
-----
JamaicaForum.nl: http://www.jamaicaforum.nl

phtomay

Quote from: isl30fvi3w on August 10, 2012, 06:31:25 AM
I tried installing this mod with no errors. But after the installation, my forum went down. I tried installing this mod and deactivating all other mods but the problem still exists.

@isl30fvi3w more like we have the same issues here but no 1 seems to be responding/helpful. Did u get any error message?

Texan78

Quote from: phtomay on August 10, 2012, 03:33:23 PM
Quote from: isl30fvi3w on August 10, 2012, 06:31:25 AM
I tried installing this mod with no errors. But after the installation, my forum went down. I tried installing this mod and deactivating all other mods but the problem still exists.

@isl30fvi3w more like we have the same issues here but no 1 seems to be responding/helpful. Did u get any error message?

Can you access the admin CP? Have you tried uninstalling and then reinstalling? Also did you create a back up before you installed it that you can restore to as I suggested above?

@DutchJam That might be just how it formats it. I am not sure if there is a way to make it wrap at a certain point. If you do it by characters it might wrap in the middle of a word and make it worse. Maybe SA has some insight.

SA™

@ DutchJam
maybe will work with regualr expression and preg_replace

$attachment['description'] = preg_replace('|</?\w+\s+[^>]*>|si', ' ', $nobbc_body);

i have not tested this expression so it may not work
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 -___-

DutchJam

Quote from: SA™ on August 10, 2012, 07:18:14 PM
@ DutchJam
maybe will work with regualr expression and preg_replace

$attachment['description'] = preg_replace('|</?\w+\s+[^>]*>|si', ' ', $nobbc_body);

i have not tested this expression so it may not work
Yup! Works excellent so far, the text in post on Facebook page look much better now!

Thanks, thanks, thanks SA!

That brings me to the publisher again...
Yesterday night the publisher did his work. But after a night good sleep and nice dreams (...) I started the computer again, pointed my browser to my forum, logged in, posted some new topics and... Nope, no publishing at all at the Facebook page. I had to re-run the 'grand permission' thing 3 times to get it work again.

I don't know where to look to solve this. I can't imagine that I have to re-run the permission stuff every time again, right. I suppose this has to be a one-time event and when i have been logged out, it has to be work again when I log in again, or is that not true?

I checked the settings of the publisher again, and they seem ok. I have my correct Page ID, Facebook ID (email address I use for logging in into FB), Access Tokes fields are filled in and I also disabled the 'remove offline_access permission' option in the Facebook app settings...

Where else can I look to solve this?
-----
JamaicaForum.nl: http://www.jamaicaforum.nl

Texan78

Dutch, I think because you're using your email it's not staying logged in. You actually need use your ID number. To find your Page ID and User ID, use this https://graph.facebook.com/yourusername replace yourusername once with your page name and then with your user name and it will give you your ID's to use. Look on the last page towards the bottom to get more information about this.

DutchJam

Quote from: Texan78 on August 11, 2012, 04:05:03 PM
Dutch, I think because you're using your email it's not staying logged in. You actually need use your ID number. To find your Page ID and User ID, use this https://graph.facebook.com/yourusername replace yourusername once with your page name and then with your user name and it will give you your ID's to use. Look on the last page towards the bottom to get more information about this.

Ah, good point Texas78!

I did not realize I also need the ID number for the User ID field... I will change this setting and see how it works out.

Thanks again for your reply and I'll let you know if it solves my problem.
-----
JamaicaForum.nl: http://www.jamaicaforum.nl

DutchJam

Quote from: DutchJam on August 11, 2012, 05:39:58 PM
Quote from: Texan78 on August 11, 2012, 04:05:03 PM
Dutch, I think because you're using your email it's not staying logged in. You actually need use your ID number. To find your Page ID and User ID, use this https://graph.facebook.com/yourusername replace yourusername once with your page name and then with your user name and it will give you your ID's to use. Look on the last page towards the bottom to get more information about this.

Ah, good point Texas78!

I did not realize I also need the ID number for the User ID field... I will change this setting and see how it works out.

Thanks again for your reply and I'll let you know if it solves my problem.
Nope... :-(

Yesterday night it worked perfect (even during the night when another forum member posted a new topic), but this morning I started PC again, pointed my browser to my forum and logged in again. Posted some new topics but none of them were posted on my Facebook page...

Both ID's (User and Page) are filled in correctly now (the number of my user account and the number of my page), so where else can I look?

Anybody an idea?
-----
JamaicaForum.nl: http://www.jamaicaforum.nl

johnpaul2k2

How can i create an Application . Please i need instructions. thank :)

isl30fvi3w

I did not create a backup of the files but instead I just did a fresh install of my forum, right after installing the sa facebook mod, the site went down with a 500 internal server error. My php version is 5. I know the file permissions are fine.
DOWNGRADE your SMF 2.0 Forum to SMF 1.1.x!

http://talk.ph/index.php?topic=3430.msg68168#new


Texan78

Quote from: isl30fvi3w on August 12, 2012, 02:05:26 PM
I did not create a backup of the files but instead I just did a fresh install of my forum, right after installing the sa facebook mod, the site went down with a 500 internal server error. My php version is 5. I know the file permissions are fine.

What kind of server are you hosted with?

Texan78

Quote from: DutchJam on August 12, 2012, 12:30:59 PM
Quote from: DutchJam on August 11, 2012, 05:39:58 PM
Quote from: Texan78 on August 11, 2012, 04:05:03 PM
Dutch, I think because you're using your email it's not staying logged in. You actually need use your ID number. To find your Page ID and User ID, use this https://graph.facebook.com/yourusername replace yourusername once with your page name and then with your user name and it will give you your ID's to use. Look on the last page towards the bottom to get more information about this.

Ah, good point Texas78!

I did not realize I also need the ID number for the User ID field... I will change this setting and see how it works out.

Thanks again for your reply and I'll let you know if it solves my problem.
Nope... :-(

Yesterday night it worked perfect (even during the night when another forum member posted a new topic), but this morning I started PC again, pointed my browser to my forum and logged in again. Posted some new topics but none of them were posted on my Facebook page...

Both ID's (User and Page) are filled in correctly now (the number of my user account and the number of my page), so where else can I look?

Anybody an idea?

Are you posting in the same board in which it was working in previously or a new board? If it is a different board then go into your Admin CP for Facebook then look under Boards and make sure the board is selected to publish.

johnpaul2k2

Quote from: Texan78 on August 12, 2012, 03:15:01 PM
Quote from: johnpaul2k2 on August 12, 2012, 01:27:33 PM
How can i create an Application . Please i need instructions. thank :)

http://developers.facebook.com/docs/opengraph/tutorial/
thanks but after following all these Process , do i still need "SA Facebook Integration" Mod???

Texan78

Quote from: johnpaul2k2 on August 12, 2012, 03:51:50 PM
thanks but after following all these Process , do i still need "SA Facebook Integration" Mod???

Yes, because you need the information from the app to input into your Facebook settings in the Admin CP in order to connect your forum to Facebook through the mod.

phtomay

Quote from: Texan78 on August 10, 2012, 03:45:47 PM
@isl30fvi3w more like we have the same issues here but no 1 seems to be responding/helpful. Did u get any error message?
Can you access the admin CP? Have you tried uninstalling and then reinstalling? Also did you create a back up before you installed it that you can restore to as I suggested above?
[/quote]

@Texan78 Thank you for the response
i cant access the Admin Cp too, so i cant uninstall the mod. I also installed it on freshly installed forum but still got the same problem

Texan78

#2798
Quote from: phtomay on August 12, 2012, 10:42:36 PM
Quote from: Texan78 on August 10, 2012, 03:45:47 PM
@isl30fvi3w more like we have the same issues here but no 1 seems to be responding/helpful. Did u get any error message?
Can you access the admin CP? Have you tried uninstalling and then reinstalling? Also did you create a back up before you installed it that you can restore to as I suggested above?

@Texan78 Thank you for the response
i cant access the Admin Cp too, so i cant uninstall the mod. I also installed it on freshly installed forum but still got the same problem

Fresh new DB too?

johnpaul2k2

Quote from: Texan78 on August 12, 2012, 08:48:07 PM
Quote from: johnpaul2k2 on August 12, 2012, 03:51:50 PM
thanks but after following all these Process , do i still need "SA Facebook Integration" Mod???

Yes, because you need the information from the app to input into your Facebook settings in the Admin CP in order to connect your forum to Facebook through the mod.
Please can you do it for me....all the process.  i am finding it hard. Please help

Advertisement: