News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SA Facebook Integration

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

Previous topic - Next topic

Kendrall

Quote from: David111567 on December 06, 2012, 06:34:28 PM
Quote from: Eclipse16V on December 06, 2012, 05:59:19 AM
Hello,
I have the following problem:
The page http://www.sa-mods.info/index.php?topic=734.0 no longer works.
Someone else can verify the setting or settings help?


sa-mods went down over a year ago. The mod is no longer supported by him (to my knowledge) and so the topics that were discussed there (including bug-fixes and conflicts with other mods like e-notify) are no longer available.  I know....major bummer.

I was able to access the site via the Wayback Machine (web-dot-archive-dot-org) but there's no guarantee any of the links will work.  You have to know the full URL of the topic in question; which, thanks to Eclipse, I was able to confirm there's a snapshot of it available here.

CAVEAT: I make no claim whatsoever about the content's validity or accuracy when using the Wayback Machine.

SMFHacks.com Team

Quote from: Kendrall on December 07, 2012, 09:29:40 AM
Quote from: David111567 on December 06, 2012, 06:34:28 PM
Quote from: Eclipse16V on December 06, 2012, 05:59:19 AM
Hello,
I have the following problem:
The page http://www.sa-mods.info/index.php?topic=734.0 no longer works.
Someone else can verify the setting or settings help?


sa-mods went down over a year ago. The mod is no longer supported by him (to my knowledge) and so the topics that were discussed there (including bug-fixes and conflicts with other mods like e-notify) are no longer available.  I know....major bummer.

I was able to access the site via the Wayback Machine (web-dot-archive-dot-org) but there's no guarantee any of the links will work.  You have to know the full URL of the topic in question; which, thanks to Eclipse, I was able to confirm there's a snapshot of it available here.

CAVEAT: I make no claim whatsoever about the content's validity or accuracy when using the Wayback Machine.

Awesome thanks! Added it to the first post
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Eclipse16V

Quote from: Kendrall on December 07, 2012, 09:29:40 AM
Quote from: David111567 on December 06, 2012, 06:34:28 PM
Quote from: Eclipse16V on December 06, 2012, 05:59:19 AM
Hello,
I have the following problem:
The page http://www.sa-mods.info/index.php?topic=734.0 no longer works.
Someone else can verify the setting or settings help?


sa-mods went down over a year ago. The mod is no longer supported by him (to my knowledge) and so the topics that were discussed there (including bug-fixes and conflicts with other mods like e-notify) are no longer available.  I know....major bummer.

I was able to access the site via the Wayback Machine (web-dot-archive-dot-org) but there's no guarantee any of the links will work.  You have to know the full URL of the topic in question; which, thanks to Eclipse, I was able to confirm there's a snapshot of it available here.

CAVEAT: I make no claim whatsoever about the content's validity or accuracy when using the Wayback Machine.
Thank you
So I now check out my data and found no error.
Nevertheless, I still have the problem that the settings for "publish" only one session is valid. Is it normal that I have every time in the ACP "Access Token" must delete and re-generate?
How can I solve the problem?
I worked with:
SMF 2 in German

Shop:
SID Giessen

cichy69

I'm getting following error:
QuoteOAuthException: (#803) Some of the aliases you requested do not exist: me&fields=id,name,username
anyone have any idea how can I fix this?

angus231

Quote from: cichy69 on December 11, 2012, 09:20:05 AM
I'm getting following error:
QuoteOAuthException: (#803) Some of the aliases you requested do not exist: me&fields=id,name,username
anyone have any idea how can I fix this?

I think it's because starting in the 5th of december have this:
"
My app used to request offline_access Permission, why can't I use that? offline_access will be deprecated on December 5th, 2012 and all apps using it should migrate to following the above steps. Further information can be found in Removal of offline_access"

the problem is the tokens....This only works with short-lived tokens that are still valid. Once they expire, your app must send the user through the auth flow again.

vbgamer45

Quote from: angus231 on December 11, 2012, 10:32:32 AM
Quote from: cichy69 on December 11, 2012, 09:20:05 AM
I'm getting following error:
QuoteOAuthException: (#803) Some of the aliases you requested do not exist: me&fields=id,name,username
anyone have any idea how can I fix this?

I think it's because starting in the 5th of december have this:
"
My app used to request offline_access Permission, why can't I use that? offline_access will be deprecated on December 5th, 2012 and all apps using it should migrate to following the above steps. Further information can be found in Removal of offline_access"

the problem is the tokens....This only works with short-lived tokens that are still valid. Once they expire, your app must send the user through the auth flow again.
Bah that would quite a bit of work.

Can you send me a direct link to that page.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

David111567


Quoteanyone have any idea how can I fix this?

....same problem here....

"OAuthException: (#803) Some of the aliases you requested do not exist: me&fields=id,name,username"

none of my users can log in from FB. This is not good.  Any help would be great...please.


Kindred

vbgamer...

https://developers.facebook.com/blog/post/2012/12/05/platform-updates--operation-developer-love/
offline_access permission removal
New security restrictions for OAuth authorization codes

https://developers.facebook.com/blog/post/2012/09/05/platform-updates--operation-developer-love/
under the Announcing December 2012 Breaking Changes (90-Day Notice) section
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

David111567

https://developers.facebook.com/blog/post/2012/09/05/platform-updates--operation-developer-love/

"New security restrictions for OAuth authorization codes
We will only allow authorization codes to be exchanged for access tokens once and will require that they be exchanged for an access token within 10 minutes of their creation. This is in line with the OAuth 2.0 Spec which from the start has stated that "authorization codes MUST be short lived and single use". For more information, check out our Authentication documentation."

Well isn't that just bleepin' special?  If I'm reading this right (and I may not be)... this app is going to require a major overhaul in order to function.  Kindred... any chance you could break this down a bit for me?  What I THINK I am hearing is that this app, which is sorta based on access tokens being longer-term (correct me if I am mistaken)... simply cannot be used for now....or patched easily? Is there a quick-fix to this that I am missing?


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

David111567

Quote from: vbgamer45 on December 11, 2012, 12:45:38 PM
It will be some major work.
There will need to be process to check if tokens are close to expiring then sending in a new authorization request.

http://stackoverflow.com/questions/9163432/access-token-expiration-not-getting-extended

http://stackoverflow.com/questions/10021892/how-to-renew-extend-facebook-access-tokens-with-php

I don't envy you, at all, man.  Sounds complex.  Please keep me posted, if you would?  Thanks.

David

cichy69

Quoteanyone have any idea how can I fix this?

....same problem here....

"OAuthException: (#803) Some of the aliases you requested do not exist: me&fields=id,name,username"

none of my users can log in from FB. This is not good.  Any help would be great...please.



I can give you my solution to this error. I don't know if this will work for you, but it works for me :)

1. Update Facebook PHP Oauth:
   a) download files from hxxp:github.com/facebook/facebook-php-sdk/tree/master/src [nonactive]
   b) upload (and overwrite) all files from 'src' folder to your '/YOUR_SERVER/SMF_PATH/facebookauth' 
2. Change file '/YOUR_SERVER/SMF_PATH/Sources/Facebook/FacebookHooks.php'
   a) find line: $user_profile = $facebook->api('/me&fields=id,name,username');
   b) replace it with: $user_profile = $facebook->api('/me?fields=id,email,username');
3. OPTIONAL (I don't know if this step was necessary)
   a) Remove your application from facebook account: 'hxxp:www.facebook.com/settings?tab=applications' [nonactive]
   b) Login to you smf using facebook auth, and grant permission to your app again

That was solution in my case.

David111567

Quote from: cichy69 on December 11, 2012, 06:34:12 PM
Quoteanyone have any idea how can I fix this?

....same problem here....

"OAuthException: (#803) Some of the aliases you requested do not exist: me&fields=id,name,username"

none of my users can log in from FB. This is not good.  Any help would be great...please.



I can give you my solution to this error. I don't know if this will work for you, but it works for me :)

1. Update Facebook PHP Oauth:
   a) download files from https://github.com/facebook/facebook-php-sdk/tree/master/src
   b) upload (and overwrite) all files from 'src' folder to your '/YOUR_SERVER/SMF_PATH/facebookauth' 
2. Change file '/YOUR_SERVER/SMF_PATH/Sources/Facebook/FacebookHooks.php'
   a) find line: $user_profile = $facebook->api('/me&fields=id,name,username');
   b) replace it with: $user_profile = $facebook->api('/me?fields=id,email,username');
3. OPTIONAL (I don't know if this step was necessary)
   a) Remove your application from facebook account: 'http://www.facebook.com/settings?tab=applications'
   b) Login to you smf using facebook auth, and grant permission to your app again

That was solution in my case.

DUDE!!!   THIS WORKS!!!  Everything is functioning NORMALLY! The mod is back online....it's GREAT.

And no....STEP #3 is not needed. I kept my original FB app. No problems whatsoever. So far.  I'll monitor the site for the rest of the night and let you know if the mod stays functional. So far...so good.

Thank you VERY much....on behalf of myself and my forum members.

vbgamer45

You probably still will need to reauthenticate every 60 days though.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

David111567

Quote from: vbgamer45 on December 11, 2012, 08:37:37 PM
You probably still will need to reauthenticate every 60 days though.

That will buy us two months while we wait for an update, though. I can live with that.  :-)

scvoyager

Quote from: Eclipse16V on December 06, 2012, 05:59:19 AM
Hello,
I have the following problem:
The page http://www.sa-mods.info/index.php?topic=734.0 [nofollow] no longer works.
Someone else can verify the setting or settings help?

Then I have the problem at the beginning of the posts were posted on Facebook and now. Suddenly no longer Without that, I've changed something.
Thanks for the idea. I had already done a uninistall and reinstall with no luck. I downloaded a fresh package and installed and still the same thing. When I look at the sql database their are no tables even created such as fb_. This problem was creating errors when members would post and no post count was credited to the member so I had to uninstall this one for now.

Shrink

Quote from: David111567 on December 11, 2012, 08:22:43 PM


DUDE!!!   THIS WORKS!!!  Everything is functioning NORMALLY! The mod is back online....it's GREAT.

And no....STEP #3 is not needed. I kept my original FB app. No problems whatsoever. So far.  I'll monitor the site for the rest of the night and let you know if the mod stays functional. So far...so good.

Thank you VERY much....on behalf of myself and my forum members.
hello Friend,
Is it works for you? Is it need any periodic work?

texasyojimbo

Quote from: osckar on April 03, 2012, 01:46:37 PM
Hi:

I'm using this mod with SMF 2.0.2 and I get this error when a user tries to register or an already registered user clicks on the Facebook configuration in profile:

QuoteAn error has occured

OAuthException: (#803) Some of the aliases you requested do not exist: me&fields=id,name,username

Any help is appreciated.

Thanks!

I found this issue tonight myself. After playing around with the Graph API Explorer (developers.facebook.com/tools/explorer). It looks like the mod is trying an invalid query string on the /me API. Note the ampersand in your exception message, I think there should be a question mark there instead. Also, I was able to reproduce the 803 error in the Graph API Explorer and make it go away by replacing /me& with /me?

I found my likely culprit on line 846 of FacebookHooks.php...

$user_profile = $facebook->api('/me&fields=id,name,username');

When I changed this line to...

$user_profile = $facebook->api('/me?fields=id,name,username');

... I was able to associate my FB account with my SMF account just fine.

The comment ("These api calls can be slow so were only do it if needed") and code immediately preceding leads me to believe that line 846 only comes into play some of the time. I was able to get this to work unmodified before... I suspect this is an intermittent bug that slipped through testing of the mod.

Just my $0.02. I am not a PHP developer... my day job is tech support on J2EE stuff... so perhaps there is some nuance that escapes me.

texasyojimbo

Aww... should have read the rest of the thread... good job cichy69!!!

texasyojimbo

I also humbly suggest the Mod devs re-factor the code in their next release so that this hard-coded string is somewhere easier to manipulate if/when Facebook changes their web service API (which could break the mod all over again). Maybe like somewhere near the top of the script? =)

Advertisement: