{"id":112,"date":"2014-05-18T17:32:49","date_gmt":"2014-05-18T08:32:49","guid":{"rendered":"http:\/\/dukehide.dip.jp\/wordpress\/com\/?p=112"},"modified":"2018-02-12T18:49:00","modified_gmt":"2018-02-12T09:49:00","slug":"twitter-bot-setting","status":"publish","type":"post","link":"https:\/\/dukehide.com\/pc\/twitter-bot-setting\/","title":{"rendered":"Twitter Bot\u8a2d\u7f6e\uff06\u904b\u7528\u30c6\u30b9\u30c8"},"content":{"rendered":"<p>\u81ea\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u767b\u9332\u3059\u308b\u3068\u3001\u5b9a\u671f\u7684\u306bTweet\u3057\u3066\u304f\u308c\u308b\u7121\u6599\u306e\u30b5\u30a4\u30c8\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u308c\u3089\u306f\u898b\u8fd4\u308a\u3068\u3057\u3066\u4f55\u304b\u3057\u3089\u306e\u544a\u77e5\u3082\u52dd\u624b\u306bTweet\u3057\u305f\u308a\u5236\u9650\u3082\u3042\u308a\u307e\u3059\u3002\u7121\u6599\u306a\u306e\u3067\u305d\u306e\u70b9\u306f\u4ed5\u65b9\u306a\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u304c\u3001\u3053\u3061\u3089\u306b\u306f\u81ea\u524d\u306e\u30b5\u30fc\u30d0\u30fc\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u306e\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u545f\u3044\u3066\u307f\u3088\u3046\uff01 \u3068\u3044\u3046\u308f\u3051\u3067\u8af8\u3005\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u7c21\u6613\u30e1\u30e2\u3002<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2014\/05\/20140518_1.png?ssl=1\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"118\" data-permalink=\"https:\/\/dukehide.com\/pc\/twitter-bot-setting\/20140518_1\/\" data-orig-file=\"https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2014\/05\/20140518_1.png?fit=710%2C790&amp;ssl=1\" data-orig-size=\"710,790\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"20140518_1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2014\/05\/20140518_1.png?fit=270%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2014\/05\/20140518_1.png?fit=575%2C640&amp;ssl=1\" tabindex=\"0\" role=\"button\" src=\"https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2014\/05\/20140518_1.png?resize=710%2C790&#038;ssl=1\" alt=\"20140518_1\" width=\"710\" height=\"790\" class=\"aligncenter size-full wp-image-118\" srcset=\"https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2014\/05\/20140518_1.png?w=710&amp;ssl=1 710w, https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2014\/05\/20140518_1.png?resize=270%2C300&amp;ssl=1 270w\" sizes=\"(max-width: 710px) 100vw, 710px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<div class=\"ex-memo\">\nTwitter dev\u30da\u30fc\u30b8\uff08https:\/\/dev.twitter.com\/apps\uff09\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u81ea\u5206\u306eTwitter\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u30ed\u30b0\u30a4\u30f3\u3002<br \/>\n[Application details]<br \/>\nName            dukehide\u3000\u2190\u30a2\u30d7\u30ea\u306e\u540d\u524d\uff08\u540c\u3058\u540d\u524d\u306f\u4f7f\u7528\u4e0d\u53ef\uff09<br \/>\nDescription     https:\/\/twitter.com\/dukehide\u3000\u2190\u30a2\u30d7\u30ea\u306e\u8aac\u660e\uff08\u4f55\u3067\u3082\u3044\u3044\uff09<br \/>\nWebsite         http:\/\/dukehide.dip.jp\/\u3000\u2190\u30a2\u30d7\u30ea\u306e\u30b5\u30a4\u30c8\uff08\u4f55\u3067\u3082\u3044\u3044\uff09<br \/>\nCallback URL    \u3000\u2190\u8a8d\u8a3c\u5f8c\u306b\u623b\u308b\u969b\u306eURL\uff08\u3053\u3053\u3067\u306f\u672a\u8a2d\u5b9a\uff09<br \/>\n<br \/>\n[Organization]<br \/>\nInformation about the organization or company associated with your application. This information is optional.<br \/>\nOrganization            None<br \/>\nOrganization website    None<br \/>\n<br \/>\n[Application settings]<br \/>\nYour application's API keys are used to authenticate requests to the Twitter Platform.<br \/>\nAccess level               Read and write (modify app permissions)\u3000\u2190\u201cRead and write\u201d\u306b\u5909\u66f4<br \/>\nAPI key                    XXXXXXXXXXXXXXXXXXXXXXXXX (manage API keys)<br \/>\nCallback URL               None<br \/>\nSign in with Twitter       Yes<br \/>\nApp-only authentication    https:\/\/api.twitter.com\/oauth2\/token<br \/>\nRequest token URL          https:\/\/api.twitter.com\/oauth\/request_token<br \/>\nAuthorize URL              https:\/\/api.twitter.com\/oauth\/authorize<br \/>\nAccess token URL           https:\/\/api.twitter.com\/oauth\/access_token<br \/>\n<br \/>\n[API Keys][Application settings]<br \/>\nKeep the \"API secret\" a secret. This key should never be human-readable in your application.<br \/>\nAPI key         XXXXXXXXXXXXXXXXXXXXXXXXX<br \/>\nAPI secret      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br \/>\nAccess level    Read and write (modify app permissions)\u3000\u2190\u201cRead and write\u201d\u306b\u5909\u66f4<br \/>\nOwner           dukehide<br \/>\nOwner ID        000000000<br \/>\n<br \/>\n[OAuth settings]<br \/>\nConsumer key:        XXXXXXXXXXXXXXXXXXXXXXXXX<br \/>\nConsumer secret:     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br \/>\nAccess token:        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br \/>\nAccess token secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n<\/div>\n<p><\/p>\n<p>\u201c[Application details]\u201d\u9805\u76ee\u306f\u9069\u5f53\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u307e\u305f\u3001Access level\u306f\u5fc5\u305a\u201cRead and write\u201d\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p>\u91cd\u8981\u306a\u306e\u306f\u201c[OAuth settings]\u201d\u9805\u76ee\u306eConsumer key\u3068Access token\u3067\u3059\u304c\u3001Access token\u306b\u95a2\u3057\u3066\u306fdev\u30da\u30fc\u30b8\u306b\u3066\u767a\u884c\u624b\u7d9a\u304d\u3092\u3057\u306a\u3044\u3068\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7a7a\u6b04\u3067\u3059\u3002\u3053\u306e4\u3064\u306e\u6587\u5b57\u5217\u3092\u30e1\u30e2\u3057\u3001\u5229\u7528\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u5185\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>\u300c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306a\u3093\u304b\u3067\u304d\u306d\u3047\u3088\uff01\u300d\u3068\u3044\u3046\u65b9\u306f\u3001\u30cd\u30c3\u30c8\u3092\u63a2\u305b\u3070Tweet\u3059\u308b\u305f\u3081\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u305d\u308c\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u65e9\u3044\u3067\u3059\u3002\u81ea\u5206\u3067\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3059\u308b\u5834\u5408\u306fOAuth\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001\u3053\u308c\u3092\u4e00\u304b\u3089\u4f5c\u308b\u306e\u306f\u5927\u5909\u306a\u306e\u3067\u3001\u3053\u308c\u3082\u30cd\u30c3\u30c8\u3067\u63a2\u3057\u307e\u3059\u3002\u6050\u3089\u304fGithub\u8fba\u308a\u306b\u30a2\u30c3\u30d7\u3055\u308c\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\uff08\u4f8b\uff1atwitteroauth\uff09\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u554f\u984c\u7121\u3051\u308c\u3070\u81ea\u5206\u306eTwitter\u30a2\u30ab\u30a6\u30f3\u30c8\u306bTweet\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002\u5f8c\u306fcrontab\u3092\u5229\u7528\u3059\u308c\u3070\u5b9a\u671f\u7684\u306bTweet\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"terminal\">\n# crontab -e<br \/>\n00 0 * * * wget --spider http:\/\/dukehide.dip.jp\/chunchun\/bot.php >\/dev\/null 2>&1<br \/>\n\u203b\u2191\uff08\u4f8b\uff09\u6bce\u65e50:00\u306b\u5b9f\u884c\uff08Tweet\uff09\u3057\u307e\u3059\n<\/div>\n<p><\/p>\n<p>\u3061\u306a\u307f\u306b\u5f53\u30b5\u30fc\u30d0\u30fc\u306e\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306fPHP\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002PHP\u30d5\u30a1\u30a4\u30eb\u5185\u90e8\u3067\u3055\u3089\u306b\u6761\u4ef6\u3092\u4ed8\u3051\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u6bce\u65e5\u545f\u304f\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3042\u3057\u304b\u3089\u305a (^^;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u767b\u9332\u3059\u308b\u3068\u3001\u5b9a\u671f\u7684\u306bTweet\u3057\u3066\u304f\u308c\u308b\u7121\u6599\u306e\u30b5\u30a4\u30c8\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u308c\u3089\u306f\u898b\u8fd4\u308a\u3068\u3057\u3066\u4f55\u304b\u3057\u3089\u306e\u544a\u77e5\u3082\u52dd\u624b\u306bTweet\u3057\u305f\u308a\u5236\u9650\u3082\u3042\u308a\u307e\u3059\u3002\u7121\u6599\u306a\u306e\u3067\u305d\u306e\u70b9\u306f\u4ed5\u65b9\u306a\u3044\u3067\u3059\u306d\u3002 \u304c\u3001\u3053\u3061\u3089\u306b\u306f\u81ea\u524d\u306e\u30b5\u30fc\u30d0\u30fc\u304c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"vkexunit_cta_each_option":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[25,3,23],"tags":[82,83,32,12],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p9iVw6-1O","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/posts\/112"}],"collection":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":0,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}