Created
September 7, 2016 03:17
-
-
Save leedohyung-dba/899560872e981691d2bbfb9f0f778e10 to your computer and use it in GitHub Desktop.
[PHP]アプリにTwitterの投稿機能を導入 ref: http://qiita.com/leedohyung-dba/items/f5254b79add95a13c2ac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"require": { | |
"themattharris/tmhoauth": "0.8.*", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//twitterの連携ソースを指定 | |
Configure::write('twitter_conf_source', array( | |
'consumer_key' => '*****************************', | |
'consumer_secret' => '************************************', | |
'user_token' => '********************************************', | |
'user_secret' => '***************************', | |
'curl_ssl_verifypeer' => false | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git@github.com:themattharris/tmhOAuth.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//画嬢ない記事投稿 | |
$params = array('status' => $up_twitter_content); | |
$endpoint = $tmhOAuth->url('1.1/statuses/update');)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="twitter:card" content="summary" /> | |
<meta name="twitter:site" content="@flickr" /> | |
<meta name="twitter:title" content="Small Island Developing States Photo Submission" /> | |
<meta name="twitter:description" content="View the album on Flickr." /> | |
<meta name="twitter:image" content="https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment