Skip to content

Instantly share code, notes, and snippets.

@leedohyung-dba
Created September 7, 2016 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leedohyung-dba/899560872e981691d2bbfb9f0f778e10 to your computer and use it in GitHub Desktop.
Save leedohyung-dba/899560872e981691d2bbfb9f0f778e10 to your computer and use it in GitHub Desktop.
[PHP]アプリにTwitterの投稿機能を導入 ref: http://qiita.com/leedohyung-dba/items/f5254b79add95a13c2ac
"require": {
"themattharris/tmhoauth": "0.8.*",
}
//twitterの連携ソースを指定
Configure::write('twitter_conf_source', array(
'consumer_key' => '*****************************',
'consumer_secret' => '************************************',
'user_token' => '********************************************',
'user_secret' => '***************************',
'curl_ssl_verifypeer' => false
));
git clone git@github.com:themattharris/tmhOAuth.git
//画嬢ない記事投稿
$params = array('status' => $up_twitter_content);
$endpoint = $tmhOAuth->url('1.1/statuses/update');));
<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