Advertisement:

Author Topic: SA Facebook Integration  (Read 1035351 times)

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2760 on: August 09, 2012, 10:44:31 AM »
one of the tokens is fo group pulishing if i rember correct so uless you are posting to a group you wont see that in other words it fine as is :)

do you have new permissions enabled in you fb app thi cab break publishing cos the mod dont work with the new permission from fb
thewe is some info on this not to far back in this topic

are you sing the auto reg method?  if so again a few pages back there is a fix for this basicly with the auto method the user dont get a pass cos it genarated auto i never got as far as to send it to the user
http://samods.github.io/SAChatBar/

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

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2761 on: August 09, 2012, 12:06:43 PM »
one of the tokens is fo group pulishing if i rember correct so uless you are posting to a group you wont see that in other words it fine as is :)

I guess I am ok there as it is a fan/business page.

do you have new permissions enabled in you fb app thi cab break publishing cos the mod dont work with the new permission from fb

Are there extended permissions on the Developers page for my App that need to be granted? If so where do I find those because I went to my app page and couldn't find anything related to it.

Only thing I clicked for granted extended permissions was this button in the image below after entered my User ID, having the Page ID did nothing, is the Page ID not needed just the User ID? Seems to me they are one in the same anyways? After clicking that button it populated my access tokens and then said Permissions granted and refreshed the page, but still nothing posts to the page on new topics.



are you sing the auto reg method?  if so again a few pages back there is a fix for this basicly with the auto method the user dont get a pass cos it genarated auto i never got as far as to send it to the user

That's what is strange about it is no matter if it is Manual or Auto it just logs them in from FB as it's suppose to but user isn't aware of their password.

What is the preferred method to use?

-Thanks!

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2762 on: August 09, 2012, 12:54:06 PM »
in your app underad advance
 Remove offline_access permission:

is that enabled if so disable it sry this is what i ment ealer by this
Quote
do you have new permissions enabled in you fb app thi cab break publishing cos the mod dont work with the new permission from fb
just couldent check it elayer

Quote
That's what is strange about it is no matter if it is Manual or Auto it just logs them in from FB as it's suppose to but user isn't aware of their password.

What is the preferred method to use?

this is the thing if people have synced the account wiht fb then they will just get logged into the forum if not then it will present fb register page to register on forum

my prefered method is manual cos the user has to set up a password to register auto it doesnt reqire any input just registers them on the forum with no input and pass is auto genarated

the auto method was only added cos i was sick of people telling me thats the whole poiont of the mod when it wasnt realy most people dont understand that the auto method is not they way for this mod ok maybe for a html coded site but forums are a whole new ball game we need sevaral things like email and password in other words i would not recomend the auto method to anyone :)

just registerd on your site and you have it set to auto reg method you can delete wayne.dennis.712 if you wont
http://samods.github.io/SAChatBar/

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

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2763 on: August 09, 2012, 01:42:36 PM »
Thanks, SA for the reply. I found the setting you were referring to and will test that shortly. I found that code that will PM the user and it works great.

If anyone else is looking for it you can find the post here...

http://www.simplemachines.org/community/index.php?topic=365503.msg3345686#msg3345686

I am trying to modify the message so it is more custom and gives more information to the user what the password is good for. One thing I am wondering is if they update their password to one of their choice will it still sync with FB where they can login with the FB account?

So this is what I am trying to do with the message. Taking this code...

Code: [Select]
$message = $txt['fb_password_welcome']; //the body of the pm
Where instead of $message = $password; it inserts some text from the language file with the password in it like this...

Code: [Select]
$txt['fb_password_welcome'] = 'Here is your password for the forum ' .$password. ' . You can use it to update your profile account setttings.';

Text is just a exmaple, will update it more, but my question is will this work and is it formatted correctly?

UPDATE: Well the text part works, just not sure how to prperly fomat the code in the text to display the password. Would it be " . $password . " or could I just use $password?

-Thanks!
« Last Edit: August 09, 2012, 01:56:18 PM by Texan78 »

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2764 on: August 09, 2012, 02:04:15 PM »
you can  use sprintf() function
Code: [Select]
sprintf($txt['fb_password_welcome'], $password)anf then
Code: [Select]
$txt['fb_password_welcome'] = 'Here is your password for the forum %1$s . You can use it to update your profile account setttings.';
then setup the pm like so

Code: [Select]
//Set up the pm
    $title = 'Forum password'; //the title of the pm
    $message = sprintf($txt['fb_password_welcome'], $password); //the body of the pm
   
    $pmfrom = array(
        'id' => 0, //user id where the pm is from
        'name' => 'Admin', //name of the user who the pm is from
        'username' => 'Admin', //username of the user who the pm is from
    );
       
    $pmto = array(
        'to' => array($memberID),// array of ids to send the pm to
        'bcc' => array()//bbc array
    );

    //Now send it
    sendpm($pmto, $title, $message , 0, $pmfrom);
http://samods.github.io/SAChatBar/

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

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2765 on: August 09, 2012, 02:29:42 PM »
BOOOYAAA! That works perfectly! Thank you! I can go back and modify the text string to say what I need it to say and add further directions to the message later.

Back to the Publisher. I disabled "Remove offline_access permission" and then went back to the Amind CP for FB and granted permissions again. This time a FB box popped up (last time if was just solid white and disappeared) and asked me if I wanted to granted permission to my app to perform or grant access for a certain function. I said allow, waited about 15-20mins for the server to update on the FB side as it requested. Made a new test post and still no new comment is posted. I only have a User ID entered and not a Page ID. Does it matter? Should only need User ID right?

Also where it says "Publish to facebook?" what is the difference in page or profile?

-Thanks!

Offline DutchJam

  • Jr. Member
  • **
  • Posts: 109
    • jamaicaforum.nl on Facebook
    • @jamaicaforumnl on Twitter
    • Het Nederlands Jamaica Forum
Re: SA Facebook Integration
« Reply #2766 on: August 09, 2012, 03:57:11 PM »
Ok, it works, thanks for your help Texan78.

Just 1 more question: when I post a new topic on the forum, its posted on my Facebook page now.
Including the first lines of the forum topic. But also some HTML is posted (<br />) in the post on the Facebook page.

How to solve this?
-----
JamaicaForum.nl: http://www.jamaicaforum.nl

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2767 on: August 09, 2012, 04:20:12 PM »
Ok, it works, thanks for your help Texan78.

Just 1 more question: when I post a new topic on the forum, its posted on my Facebook page now.
Including the first lines of the forum topic. But also some HTML is posted (<br />) in the post on the Facebook page.

How to solve this?

LoL! I wish I had that problem. That is what I am trying to get to work at this moment is it posting new topics to my facebook page. What did you have to do to get it to post new topics, other then the settings in the admin CP. If I can get my going maybe I can test it and see if it happens to me too.

Also if you can post some screenshots of what the output looks like with on the Facebook page.

Offline DutchJam

  • Jr. Member
  • **
  • Posts: 109
    • jamaicaforum.nl on Facebook
    • @jamaicaforumnl on Twitter
    • Het Nederlands Jamaica Forum
Re: SA Facebook Integration
« Reply #2768 on: August 09, 2012, 05:07:18 PM »
Ok, it works, thanks for your help Texan78.

Just 1 more question: when I post a new topic on the forum, its posted on my Facebook page now.
Including the first lines of the forum topic. But also some HTML is posted (<br />) in the post on the Facebook page.

How to solve this?

LoL! I wish I had that problem. That is what I am trying to get to work at this moment is it posting new topics to my facebook page. What did you have to do to get it to post new topics, other then the settings in the admin CP. If I can get my going maybe I can test it and see if it happens to me too.

Also if you can post some screenshots of what the output looks like with on the Facebook page.

Ooooops... I shouted too early...

It seems I have the same problem as you here. At first the mod posted all new topics (and replies) to my Facebook page, but after a while it stopped posting...

I found out that I have to use my profile account to set the 'grand permissions'. Then, while logged in to my personal profile at Facebook, the posting (to my Facebook forum page) works fine. But when I at Facebook switch from my Facebook profile page to my Facebook forum page to check, the posting stops, even when I return to my profile page...

As far as I can see, my settings in the mod control panel are the same as yours and I also disabled the 'remove offline_access permission' option in the Facebook app settings.

I simply don't understand why it works for a while and then stop...

Concerning the output: it looks good, only the text taken from the original post on the forum looks like this:
Jamaica's sprint king Usain Bolt reaffirmed his status as a “legend” when he ran 9.32  to win the Olympic 200m title. <br /><br />Teammates Yohan Blake was second in 19.44 while Warren Weir was third in 19.84.

Notice the <br /> tags in the text...
-----
JamaicaForum.nl: http://www.jamaicaforum.nl

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2769 on: August 09, 2012, 07:14:41 PM »
SA, any suggestions? I can't get new topics to publish to my Facebook page at all. Even after granting permission. I get a pop up box asking if I want to allow it. I select allow then the page refreshes but still nothing.

Dutch, do you have both your Page ID and User ID entered on your publisher page?

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2770 on: August 09, 2012, 11:05:14 PM »
you need to enter you page id and do the grant permissions thing again
http://samods.github.io/SAChatBar/

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

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2771 on: August 09, 2012, 11:43:35 PM »
What is my Page ID? Where do I find that, is that different from User ID? I mean I know what they are but which is which?

Page ID My Fan page?

User ID my personal page?

-Thanks!
« Last Edit: August 09, 2012, 11:53:36 PM by Texan78 »

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2772 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
http://samods.github.io/SAChatBar/

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

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2773 on: August 09, 2012, 11:58:34 PM »
Quote
Page ID My Fan page?

User ID my personal page?

yes thats correct
http://samods.github.io/SAChatBar/

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

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2774 on: August 10, 2012, 12:04:00 AM »
Ah yea boy, we have lift off! Apparently I had the wrong ID from other links I had read about finding it. What was funny is just before I saw your last post I found that URL https://graph.facebook.com/yourusername. Wish I had found that earlier, that URL tells you all you need to know!

Ok, just a real quick question so I will know how to field them from members.

1. If a member changes his email in his profile after he has logged in with Facebook will that prevent them from logging in with the Facebook App causing them to starting over again or will the session ID notice the changes? Hope that made sense.

2. If a member doesn't change their email and it stays with the Facebook email by default. If someone emails them would that go to their Facebook email or what?

-Thanks Again!

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2775 on: August 10, 2012, 12:08:23 AM »
1 no it will still work as emails are not tyed to fb

2 i think it go to fb inbox not too sure tho
http://samods.github.io/SAChatBar/

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

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2776 on: August 10, 2012, 12:35:12 AM »
1 no it will still work as emails are not tyed to fb

Gotcha, so the forum just pulls the FB username@facbook.com email so it has something to register with I guess right? It all works now so that's great but, it would be nice if it could pull the email and use the one the member signed up with FB with. That would probably be a little complicated due to privacy. No biggie, it works so I am happy.

2 i think it go to fb inbox not too sure tho

Well just did a test and it doesn't go to the FB inbox. I thought maybe it wasn't sending mail. So to confirm the mail was working I sent it to a test user I have set up and the mail sent fine to that user. So FYI, if they register on the forum with FB they won't get mail. So they will need to update that in their profile. Guess I need to mention that in the PM they get for their password when they register.

-Thanks!

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Integration
« Reply #2777 on: August 10, 2012, 12:46:31 AM »
Quote
Gotcha, so the forum just pulls the FB username@facbook.com email so it has something to register with I guess right? It all works now so that's great but, it would be nice if it could pull the email and use the one the member signed up with FB with. That would probably be a little complicated due to privacy. No biggie, it works so I am happy.

Code: [Select]
Well just did a test and it doesn't go to the FB inbox. I thought maybe it wasn't sending mail. So to confirm the mail was working I sent it to a test user I have set up and the mail sent fine to that user. So FYI, if they register on the forum with FB they won't get mail. So they will need to update that in their profile. Guess I need to mention that in the PM they get for their password when they register.
well it does attemp to fetch the email registerd on fb with but but it does fail more than work this is why fb emaill addy was added another reson not to use the auto register methode i guess :D
http://samods.github.io/SAChatBar/

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

Offline isl30fvi3w

  • Semi-Newbie
  • *
  • Posts: 58
Re: SA Facebook Integration
« Reply #2778 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.
DOWNGRADE your SMF 2.0 Forum to SMF 1.1.x!

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

Offline Texan78

  • Full Member
  • ***
  • Posts: 509
  • Gender: Male
    • WeatherConnectionForum on Facebook
    • @WxConnection on Twitter
    • Weather Connection
Re: SA Facebook Integration
« Reply #2779 on: August 10, 2012, 11:19:33 AM »
Did you back up your files first that you can restore from to see if the problem still occurs and go from there?