{"id":476,"date":"2012-01-20T10:33:26","date_gmt":"2012-01-20T01:33:26","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/wordpress\/?p=476"},"modified":"2012-01-20T10:33:26","modified_gmt":"2012-01-20T01:33:26","slug":"stack-overflow-questions-tags-users-badges-unanswered-asktwitter4r-twitterforbiddenerror","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=476","title":{"rendered":"Twitter4R Twitter::ForbiddenError"},"content":{"rendered":"<p>Twitter4R\u3092\u4f7f\u7528\u3057\u3066\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u305f\u304c\u3001\u3069\u3046\u3057\u3066\u3082\u4e0b\u8a18\u306e\u73fe\u8c61\u3067\u8ae6\u3081\u3056\u308b\u3092\u5f97\u306a\u3044\u72b6\u6cc1\u3068\u306a\u3063\u305f\u3088\u3046\u3060\u3002<\/p>\n<p>[ruby]<br \/>\ntwitter = Twitter::Client.new(oauth_access: { key: token, secret: token_secret})<\/p>\n<p>#\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u52d5\u4f5c\u3059\u308b<br \/>\ntwitter.status(:post, &quot;POST TEST!!!&quot;)<br \/>\ntwitter.friend(:add, &quot;twitter_user&quot;)<\/p>\n<p>#\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306f ForbiddenError\u3068\u306a\u308b<br \/>\nfriends = twitter.my(:friends)<br \/>\nfriends = twitter.user.friends<br \/>\n[\/ruby]<\/p>\n<p>\u7d50\u5c40\u3001twitter4r(0.7.0) \u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001twitter-2.0.2 \u3092\u4ee3\u308f\u308a\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u518d\u958b\u767a\u3002\u3053\u308c\u3067\u3046\u307e\u304f\u3044\u304f\u306e\u304b\u308f\u304b\u3089\u306a\u3044\u304c\u3001\u53d6\u308a\u305f\u304b\u3063\u305f\u60c5\u5831(friends\/ids)\u306f\u53d6\u308c\u305f\u3002<\/p>\n<p>\u5f8c\u65e5\u3001\u8a18\u8ff0\u4e88\u5b9a\u3002<\/p>\n<p>[bash]<br \/>\nC:works&gt;gem list twitter<br \/>\n*** LOCAL GEMS ***<br \/>\ntwitter4r (0.7.0)<\/p>\n<p>C:works&gt;gem uninstall twitter4r<br \/>\nRemove executables:<br \/>\n        t4rsh, t4r-oauth-access<\/p>\n<p>in addition to the gem? [Yn]  y<br \/>\nRemoving t4rsh<br \/>\nRemoving t4r-oauth-access<br \/>\nSuccessfully uninstalled twitter4r-0.7.0<\/p>\n<p>C:works&gt;gem install twitter<br \/>\nFetching: addressable-2.2.6.gem (100%)<br \/>\nFetching: multipart-post-1.1.4.gem (100%)<br \/>\nFetching: faraday-0.7.5.gem (100%)<br \/>\nFetching: simple_oauth-0.1.5.gem (100%)<br \/>\nFetching: twitter-2.0.2.gem (100%)<br \/>\n********************************************************************************<\/p>\n<p>  You should follow @gem on Twitter for announcements and updates about the gem.<br \/>\n  <a class=\"twitter-timeline\" data-width=\"500\" data-height=\"750\" data-dnt=\"true\" href=\"https:\/\/twitter.com\/gem?ref_src=twsrc%5Etfw\">Tweets by gem<\/a><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>  Please direct any questions about the library to the mailing list.<br \/>\n  https:\/\/groups.google.com\/group\/ruby-twitter-gem<\/p>\n<p>  Does your project or organization use this gem? Add it to the apps wiki!<br \/>\n  https:\/\/github.com\/jnunemaker\/twitter\/wiki\/apps<\/p>\n<p>********************************************************************************<br \/>\nSuccessfully installed addressable-2.2.6<br \/>\nSuccessfully installed multipart-post-1.1.4<br \/>\nSuccessfully installed faraday-0.7.5<br \/>\nSuccessfully installed simple_oauth-0.1.5<br \/>\nSuccessfully installed twitter-2.0.2<br \/>\n5 gems installed<br \/>\n[\/bash]<\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/8906251\/twitter4rtwitterforbiddenerror\">stackoverflow.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Twitter4R\u3092\u4f7f\u7528\u3057\u3066\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u305f\u304c\u3001\u3069\u3046\u3057\u3066\u3082\u4e0b\u8a18\u306e\u73fe\u8c61\u3067\u8ae6\u3081\u3056\u308b\u3092\u5f97\u306a\u3044\u72b6\u6cc1\u3068\u306a\u3063\u305f\u3088\u3046\u3060\u3002 [ruby] twitter = Twitter::Client.new(oauth_access: { key [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[14,16,4],"tags":[],"class_list":["post-476","post","type-post","status-publish","format-standard","hentry","category-ruby","category-twitter","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=476"}],"version-history":[{"count":0,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/476\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}