pages tagged twitter http://meng6net.localhost/tag/twitter/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Tue, 16 May 2017 23:59:39 +0000 Examples of using jq http://meng6net.localhost/computing/example/examples_of_using_jq/ http://meng6net.localhost/computing/example/examples_of_using_jq/ computing example jq twitter Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <p>(Draft)</p> <h2>Get sample JSON data</h2> <p>We'll get some sample JSON data by using cURL to call Twitter's API.</p> <h3>2014 March</h3> <p>As of 2014 March Twitter API v1.1, the following method works.</p> <ol> <li>Go to Twitter app's home page and make a testing app such as https://apps.twitter.com/app/5928994/,</li> <li>click on the <a href= "https://dev.twitter.com/apps/5928994/oauth">"Test OAuth" button</a> to see various authentication metadata,</li> <li>click on "See OAuth signature for this request" button, and see more specialized authentication data, including a directly usable temporary cURL command for the RESTful request.</li> </ol> <p>As an example</p> <pre><code>curl \ --get 'https://api.twitter.com/1.1/statuses/user_timeline.json' \ --data 'count=2&amp;screen_name=twitterapi' \ --header 'Authorization: \ OAuth oauth_consumer_key="Iie5pLbQHTcvsNSL4Q9bQ", \ oauth_nonce="5ae19d9143cfec50b3990e19e8863b21", \ oauth_signature="NROfqSHW1BLMFwK8ePbZQfLzwaI%3D", \ oauth_signature_method="HMAC-SHA1", \ oauth_timestamp="1395206578", \ oauth_token="14663976-CN3V54WoIXzofcn697ooLjDRaNuHS0ZiEFLCMDyK4", \ oauth_version="1.0"' \ --verbose \ &gt; twitter-api-get-output.json </code></pre> <p>obtains JSON data <a href= "http://meng6.net/pages/computing/example/examples_of_using_jq/twitter-api-get-output.json"> <code>twitter-api-get-output.json</code></a>.</p> <p>Note this exact call is only valid for a few minutes after it was first created.</p> <h2>Example jq queries</h2> <p>Get all values of <code>text</code>:</p> <pre><code>$ cat twitter-api-get-output.json | jq '.[].text' "Broadcasting the voices of WordPress users, one Tweet at a time https://t.co/XCkAskpXVB" "RT @crashlytics: Announcing Crashlytics Labs Project: Beta Distribution http://t.co/JifugCbtU2 #androiddev #iosdev http://t.co/Y0e2Ahm9lI" </code></pre> Wolfram-related Twitter accounts and the alike http://meng6net.localhost/blog/wolfram-related_twitter_accounts_and_the_alike/ http://meng6net.localhost/blog/wolfram-related_twitter_accounts_and_the_alike/ blog mathematica note twitter weibo wolfram Sat, 07 Mar 2015 02:37:38 +0000 2017-05-16T23:59:39Z <ul> <li>news, blogs, comprehensive <ul> <li>Wolfram: <a href= "https://twitter.com/WolframResearch">@WolframResearch</a></li> <li>Wolfram Japan: <a href= "https://twitter.com/WolframJapan">@WolframJapan</a></li> <li>Wolfram China: <a href= "http://www.weibo.com/wolframchina">@WolframChina</a></li> <li>Wolfram Education: <a href= "https://twitter.com/WolframEdu">@WolframEdu</a></li> <li>Wolfram Careers: <a href= "https://twitter.com/WolframCareers">@WolframCareers</a></li> <li>Stephen Wolfram: <a href= "https://twitter.com/stephen_wolfram">@stephen_wolfram</a></li> <li>Conrad Wolfram: <a href= "https://twitter.com/conradwolfram">@conradwolfram</a></li> <li>Wolfram NKS: <a href= "https://twitter.com/WolframNKS">@WolframNKS</a></li> <li><a href="https://blog.wolfram.com">Wolfram Blog</a></li> <li><a href="http://blog.stephenwolfram.com/">Stephen Wolfram Blog</a></li> </ul> </li> <li>Wolfram Language / Mathematica <ul> <li>MathematicaTip: <a href= "https://twitter.com/MathematicaTip">@MathematicaTip</a></li> <li>Mathematica SE: <a href= "https://twitter.com/StackMma">@StackMma</a></li> <li>Tweet-a-Program: <a href= "https://twitter.com/wolframtap">@wolframtap</a>, <a href= "http://wolframtap.tumblr.com/archive">archive on Tumblr</a></li> <li>Mathematica Cookbook: <a href= "https://twitter.com/salmangano">@salmangano</a></li> <li>Wolfram Tip: <a href= "https://twitter.com/WolframTip">@WolframTip</a></li> <li>Sina Weibo: <ul> <li>面向教育的Mathematica: <a href= "http://www.weibo.com/u/5377153058">@面向教育的Mathematica</a></li> <li>Mathematica_李想: <a href= "http://www.weibo.com/u/1682600994">@Mathematica_李想</a></li> <li>Mathematica 中文使用者: <a href= "http://weibo.com/mmachineseusers">@Mathematica中文使用者</a></li> <li>Wolfram 语言编程珠玑: <a href= "http://www.weibo.com/wolframtip">@WolframTip</a></li> </ul> </li> <li><a href="http://mathematica.blogoverflow.com/">Mathematica StackExchange community blog</a></li> </ul> </li> <li>Wolfram|Alpha <ul> <li>Wolfram|Alpha: <a href= "https://twitter.com/Wolfram_Alpha">@Wolfram_Alpha</a></li> <li>Wolfram Fun Facts: <a href= "https://twitter.com/WolframFunFacts">@WolframFunFacts</a></li> <li>Wolfram|Alpha Can't: <a href= "https://twitter.com/wacnt">@wacnt</a></li> <li>WolframAlpha queries: <a href= "https://twitter.com/WA_queries">@WA_queries</a></li> <li>Wolfram_Alpha: <a href= "http://www.weibo.com/wolpha">@Wolfram_Alpha</a></li> <li><a href="http://wolframalpha.tumblr.com/">Wolfram|Alpha Tumblr</a></li> <li><a href="http://blog.wolframalpha.com/">Wolfram|Alpha blog</a></li> </ul> </li> </ul> /blog/wolfram-related_twitter_accounts_and_the_alike/#comments