Skip to main content
Participant
November 4, 2017
Question

CFOAuth type="facebook" returns error

  • November 4, 2017
  • 3 replies
  • 782 views

Hi,

I created a file called cfoauth_facebook.cfm with the following code.

The Facebook developer app with clientid, secret key etc has been setup correctly. But when the following code is executed, i only get a error in the response variable called res.

<cflogin>

<cfoauth

type = "Facebook"

clientid = "MyClientId"

secretkey = "MySecretKey"

result = "res"

scope="email"

redirecturi = "https://testsite.localtest.me/cf16/cfoauth/cfoauth_facebook.cfm">

<cfdump var="#res#">

<cftry>

<cfloginuser name="#res.other.username#" password="#res.access_token#" roles="user">

<cfcatch type="any">

</cfcatch>

</cftry>

</cflogin>

<cfabort>

------------------------------- The response is-----------------

struct

access_token n":"EAALbDZBHSZBNUBAIVhtNLCydBu1A3pYIoTpkofVKQHXTrZCM2E2gYLOpOknRM74ZAw5YZCmZBtyNHkZCXnfqV4XWga2zzWvwMKjET9ZAUKt7hXO0PmX0AM8Hz012oKV4aIXf2ZAfqVA2gYWMg3HeDRkImXJLEilF8v48Gr8cq6wGHJZB7I7WuK9RIO","token_type":"bearer",

gender undefined

id undefined

locale undefined

name undefined

other

struct

error

struct

code 190

fbtrace_id AdyVnuYjDD2

message Invalid OAuth access token.

type OAuthException

state undefined

There is absolutely no valid reference for the CFOAuth implementation in ColdFusion 2016. Can you please share some sample?. I hope it is not a new bug in CF2016 due to Facebook changing its API version etc.

This topic has been closed for replies.

3 replies

frankiedelia05
Participant
January 21, 2018

Any update on this? I am getting the same error

Participant
January 23, 2018

Hi,

I could not get it to work. Must try with the most recent version of CF Aether pre release version that I have downloaded recently and see how it performs. I have been able to do a ASP.net core2.0 site with social media logins & own db security login etc in possibly less than a couple of days.

Participant
November 7, 2017

Does anyone look at these posts or reply to them?

Inspiring
November 7, 2017

Yes.  I suppose this is not a common feature so no one immediately had anything to suggest.  In the past I had stripped OAuth functionality out of this library and it has served me well: monkehTweets/com/coldfumonkeh at master · coldfumonkeh/monkehTweets · GitHub

Using a widget for this sort of scares me TBH as 3rd party implementations change all of the time.  Having some modicum of control and not relying on a black box for security would be my preference.

-Nic

Participant
November 7, 2017

I just tried logging in to forums.adobe.com using my facebook login and got errors. They need to fix this. I upgrade to CF 2016 for this functionality.

Participant
November 7, 2017

BTW.  I am getting the exact same info in my struct.