Coder Social home page Coder Social logo

Comments (11)

hooopo avatar hooopo commented on August 26, 2024

是你在获取access_token的步骤没有成功

from oauth_china.

jcheng77 avatar jcheng77 commented on August 26, 2024

这个access_token是第一次授权的时候 存到数据库的
有没成功是什么意思? 你的意思是说在load之前再取一次access token通过/oauth/access_token请求?

from oauth_china.

hooopo avatar hooopo commented on August 26, 2024

你确定第一次授权成功了?

from oauth_china.

jcheng77 avatar jcheng77 commented on August 26, 2024

是呀 第一次授权成功了 所以才得到了access_token和token_secret 存在了db里 是有值的 如果没有成功这两个值是不会有的吧

现在是授权成功登录到我的网站之后 要发微博的时候 我通过之前存下来的access_token和token_secret来load_client再add_status

这个思路没有问题吧? 有没有例子我可以来验证的?

from oauth_china.

hooopo avatar hooopo commented on August 26, 2024

你可以在第一次授权成功的时候直接调用add_status方法发送微薄,看看能否发送成功。

from oauth_china.

jcheng77 avatar jcheng77 commented on August 26, 2024

第一次授权成功后可以发送 但是就是不知道之后从db load client之后 再要发送的时候 为什么就会报上面的错??

from oauth_china.

hooopo avatar hooopo commented on August 26, 2024

可以看看你的代码吗

from oauth_china.

jcheng77 avatar jcheng77 commented on August 26, 2024

我的代码有问题没? 要我给你发文件 或者怎么让你访问我的代码?

from oauth_china.

hooopo avatar hooopo commented on August 26, 2024

你试过腾讯微薄吗 会出现同样的问题吗

from oauth_china.

jcheng77 avatar jcheng77 commented on August 26, 2024

找到原因了。。。。

def self.load(data)
oauth = self.new(data[:request_token], data[:request_token_secret])
oauth.access_token = ::OAuth::AccessToken.new(oauth.consumer, data[:access_token], data[:access_token_secret]) if data[:access_token] && data[:access_token_secret]
oauth
end

把:access_token_secret改过:token_secret。。。。。。。。

from oauth_china.

jcheng77 avatar jcheng77 commented on August 26, 2024

我把我的symbol改过来了...可以了

from oauth_china.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.