害怕问这个问题,因为我无法为其创建jsfiddle,但希望有人能够提供帮助。
我正在尝试在ColdFusion中为instagram登录创建cfc。这部分完成了。我使用的是邮递员(Google应用程序),凭我的凭据,我可以在json中看到用户的数据,但是当我将其转换为ColdFusion时,会出现错误。我试图更改数据类型,标头和很多行,但仍然一次又一次遇到相同的错误。
我的代码(为安全起见,用xxx替换了id)
<cftry>
<cfhttp url="https://api.instagram.com/oauth/access_token" method="post" resolveurl="yes">
<cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" />
<cfhttpparam type="formfield" name="client_id" value="14faxxxxxdc5440f86x6cdd8xxxxf78" />
<cfhttpparam type="formField" name="client_secret" value="40xa78220cfb" />
<cfhttpparam type="formField" name="grant_type" value="authorization_code" />
<cfhttpparam type="formField" name="redirect_uri" value="#URLEncodedFormat('http://example.com/demo/instagramAPI/success.cfm')#" />
<cfhttpparam type="formField" name="code" value="#url.code#" />
</cfhttp>
<cfdump var="#cfhttp#"><cfabort>
<cfcatch type="any">
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
我正在从此答案中遵循此代码。有关更多信息,请检查此。您可以看到我使用相同的登录详细信息来获取数据,但是通过cfc进行相同操作时却出现错误。
我已经阅读了许多文章和博客,但仍然无法解决该错误。谁能帮助我了解我在做什么错?如果您还有其他建议,请告诉我。
如果需要任何其他信息,请告诉我。
几天之后,终于我得到了我问题的答案。.Thanx Miguel-F和Mark A Kruger但是Mark的链接对我不利,因为那是我的问题。
What i did is to update my SSL certificate. I tried before but was not having much information like Organization unit etc but then i followed the steps given in this Link, provided by Miguel and tested then i got expiration code error.
After that i tried to refresh with ?reinit=1 as i made changes in my cfc but forget to reinitialize after updating the certificate, and then i got the result :)
SO final answer is Update your SSL certificate with proper authorization and cfc can fetch data from Instagram..
Link useful for me One, CFC demo. In cfc demo you can download the cfc for instagram which is also useful (even in case you don't have to update the SSL certificate).
如果有人对Instagram cfc有疑问,请告诉我。.我花了几天时间在此上,可以为您提供帮助.. :)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句