OAuthSupport.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_161) on Thu Aug 16 18:54:14 JST 2018 -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <title>OAuthSupport (twitter4j-core 4.0.7 API)</title>
  8. <meta name="date" content="2018-08-16">
  9. <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
  10. <script type="text/javascript" src="../../script.js"></script>
  11. </head>
  12. <body>
  13. <script type="text/javascript"><!--
  14. try {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="OAuthSupport (twitter4j-core 4.0.7 API)";
  17. }
  18. }
  19. catch(err) {
  20. }
  21. //-->
  22. var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6};
  23. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
  24. var altColor = "altColor";
  25. var rowColor = "rowColor";
  26. var tableTab = "tableTab";
  27. var activeTableTab = "activeTableTab";
  28. </script>
  29. <noscript>
  30. <div>JavaScript is disabled on your browser.</div>
  31. </noscript>
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <div class="topNav"><a name="navbar.top">
  34. <!-- -->
  35. </a>
  36. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  37. <a name="navbar.top.firstrow">
  38. <!-- -->
  39. </a>
  40. <ul class="navList" title="Navigation">
  41. <li><a href="../../overview-summary.html">Overview</a></li>
  42. <li><a href="package-summary.html">Package</a></li>
  43. <li class="navBarCell1Rev">Class</li>
  44. <li><a href="class-use/OAuthSupport.html">Use</a></li>
  45. <li><a href="package-tree.html">Tree</a></li>
  46. <li><a href="../../deprecated-list.html">Deprecated</a></li>
  47. <li><a href="../../index-all.html">Index</a></li>
  48. <li><a href="../../help-doc.html">Help</a></li>
  49. </ul>
  50. </div>
  51. <div class="subNav">
  52. <ul class="navList">
  53. <li><a href="../../twitter4j/auth/OAuthAuthorization.html" title="class in twitter4j.auth"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  54. <li><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  55. </ul>
  56. <ul class="navList">
  57. <li><a href="../../index.html?twitter4j/auth/OAuthSupport.html" target="_top">Frames</a></li>
  58. <li><a href="OAuthSupport.html" target="_top">No&nbsp;Frames</a></li>
  59. </ul>
  60. <ul class="navList" id="allclasses_navbar_top">
  61. <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  62. </ul>
  63. <div>
  64. <script type="text/javascript"><!--
  65. allClassesLink = document.getElementById("allclasses_navbar_top");
  66. if(window==top) {
  67. allClassesLink.style.display = "block";
  68. }
  69. else {
  70. allClassesLink.style.display = "none";
  71. }
  72. //-->
  73. </script>
  74. </div>
  75. <div>
  76. <ul class="subNavList">
  77. <li>Summary:&nbsp;</li>
  78. <li>Nested&nbsp;|&nbsp;</li>
  79. <li>Field&nbsp;|&nbsp;</li>
  80. <li>Constr&nbsp;|&nbsp;</li>
  81. <li><a href="#method.summary">Method</a></li>
  82. </ul>
  83. <ul class="subNavList">
  84. <li>Detail:&nbsp;</li>
  85. <li>Field&nbsp;|&nbsp;</li>
  86. <li>Constr&nbsp;|&nbsp;</li>
  87. <li><a href="#method.detail">Method</a></li>
  88. </ul>
  89. </div>
  90. <a name="skip.navbar.top">
  91. <!-- -->
  92. </a></div>
  93. <!-- ========= END OF TOP NAVBAR ========= -->
  94. <!-- ======== START OF CLASS DATA ======== -->
  95. <div class="header">
  96. <div class="subTitle">twitter4j.auth</div>
  97. <h2 title="Interface OAuthSupport" class="title">Interface OAuthSupport</h2>
  98. </div>
  99. <div class="contentContainer">
  100. <div class="description">
  101. <ul class="blockList">
  102. <li class="blockList">
  103. <dl>
  104. <dt>All Known Subinterfaces:</dt>
  105. <dd><a href="../../twitter4j/Twitter.html" title="interface in twitter4j">Twitter</a></dd>
  106. </dl>
  107. <dl>
  108. <dt>All Known Implementing Classes:</dt>
  109. <dd><a href="../../twitter4j/auth/OAuthAuthorization.html" title="class in twitter4j.auth">OAuthAuthorization</a></dd>
  110. </dl>
  111. <hr>
  112. <br>
  113. <pre>public interface <span class="typeNameLabel">OAuthSupport</span></pre>
  114. <dl>
  115. <dt><span class="simpleTagLabel">Since:</span></dt>
  116. <dd>Twitter4J 2.1.0</dd>
  117. <dt><span class="simpleTagLabel">Author:</span></dt>
  118. <dd>Yusuke Yamamoto - yusuke at mac.com</dd>
  119. </dl>
  120. </li>
  121. </ul>
  122. </div>
  123. <div class="summary">
  124. <ul class="blockList">
  125. <li class="blockList">
  126. <!-- ========== METHOD SUMMARY =========== -->
  127. <ul class="blockList">
  128. <li class="blockList"><a name="method.summary">
  129. <!-- -->
  130. </a>
  131. <h3>Method Summary</h3>
  132. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  133. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  134. <tr>
  135. <th class="colFirst" scope="col">Modifier and Type</th>
  136. <th class="colLast" scope="col">Method and Description</th>
  137. </tr>
  138. <tr id="i0" class="altColor">
  139. <td class="colFirst"><code><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a></code></td>
  140. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthAccessToken--">getOAuthAccessToken</a></span>()</code>
  141. <div class="block">Returns an access token associated with this instance.<br>
  142. If no access token is associated with this instance, this will retrieve a new access token.</div>
  143. </td>
  144. </tr>
  145. <tr id="i1" class="rowColor">
  146. <td class="colFirst"><code><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a></code></td>
  147. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthAccessToken-twitter4j.auth.RequestToken-">getOAuthAccessToken</a></span>(<a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;requestToken)</code>
  148. <div class="block">Retrieves an access token associated with the supplied request token and sets userId.</div>
  149. </td>
  150. </tr>
  151. <tr id="i2" class="altColor">
  152. <td class="colFirst"><code><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a></code></td>
  153. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthAccessToken-twitter4j.auth.RequestToken-java.lang.String-">getOAuthAccessToken</a></span>(<a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;requestToken,
  154. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;oauthVerifier)</code>
  155. <div class="block">Retrieves an access token associated with the supplied request token and sets userId.</div>
  156. </td>
  157. </tr>
  158. <tr id="i3" class="rowColor">
  159. <td class="colFirst"><code><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a></code></td>
  160. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthAccessToken-java.lang.String-">getOAuthAccessToken</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;oauthVerifier)</code>
  161. <div class="block">Retrieves an access token.</div>
  162. </td>
  163. </tr>
  164. <tr id="i4" class="altColor">
  165. <td class="colFirst"><code><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a></code></td>
  166. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthAccessToken-java.lang.String-java.lang.String-">getOAuthAccessToken</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;screenName,
  167. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)</code>
  168. <div class="block">Retrieves an access token associated with the supplied screen name and password using xAuth.<br>
  169. In order to get access acquire AccessToken using xAuth, you must apply by sending an email to api@twitter.com — all other applications will receive an HTTP 401 error.</div>
  170. </td>
  171. </tr>
  172. <tr id="i5" class="rowColor">
  173. <td class="colFirst"><code><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a></code></td>
  174. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthRequestToken--">getOAuthRequestToken</a></span>()</code>
  175. <div class="block">Retrieves a request token</div>
  176. </td>
  177. </tr>
  178. <tr id="i6" class="altColor">
  179. <td class="colFirst"><code><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a></code></td>
  180. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthRequestToken-java.lang.String-">getOAuthRequestToken</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;callbackURL)</code>
  181. <div class="block">Retrieves a request token</div>
  182. </td>
  183. </tr>
  184. <tr id="i7" class="rowColor">
  185. <td class="colFirst"><code><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a></code></td>
  186. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthRequestToken-java.lang.String-java.lang.String-">getOAuthRequestToken</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;callbackURL,
  187. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;xAuthAccessType)</code>
  188. <div class="block">Retrieves a request token</div>
  189. </td>
  190. </tr>
  191. <tr id="i8" class="altColor">
  192. <td class="colFirst"><code><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a></code></td>
  193. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#getOAuthRequestToken-java.lang.String-java.lang.String-java.lang.String-">getOAuthRequestToken</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;callbackURL,
  194. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;xAuthAccessType,
  195. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;xAuthMode)</code>
  196. <div class="block">Retrieves a request token</div>
  197. </td>
  198. </tr>
  199. <tr id="i9" class="rowColor">
  200. <td class="colFirst"><code>void</code></td>
  201. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#setOAuthAccessToken-twitter4j.auth.AccessToken-">setOAuthAccessToken</a></span>(<a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a>&nbsp;accessToken)</code>
  202. <div class="block">Sets the access token</div>
  203. </td>
  204. </tr>
  205. <tr id="i10" class="altColor">
  206. <td class="colFirst"><code>void</code></td>
  207. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/auth/OAuthSupport.html#setOAuthConsumer-java.lang.String-java.lang.String-">setOAuthConsumer</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;consumerKey,
  208. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;consumerSecret)</code>
  209. <div class="block">sets the OAuth consumer key and consumer secret</div>
  210. </td>
  211. </tr>
  212. </table>
  213. </li>
  214. </ul>
  215. </li>
  216. </ul>
  217. </div>
  218. <div class="details">
  219. <ul class="blockList">
  220. <li class="blockList">
  221. <!-- ============ METHOD DETAIL ========== -->
  222. <ul class="blockList">
  223. <li class="blockList"><a name="method.detail">
  224. <!-- -->
  225. </a>
  226. <h3>Method Detail</h3>
  227. <a name="setOAuthConsumer-java.lang.String-java.lang.String-">
  228. <!-- -->
  229. </a>
  230. <ul class="blockList">
  231. <li class="blockList">
  232. <h4>setOAuthConsumer</h4>
  233. <pre>void&nbsp;setOAuthConsumer(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;consumerKey,
  234. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;consumerSecret)</pre>
  235. <div class="block">sets the OAuth consumer key and consumer secret</div>
  236. <dl>
  237. <dt><span class="paramLabel">Parameters:</span></dt>
  238. <dd><code>consumerKey</code> - OAuth consumer key</dd>
  239. <dd><code>consumerSecret</code> - OAuth consumer secret</dd>
  240. <dt><span class="throwsLabel">Throws:</span></dt>
  241. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - when OAuth consumer has already been set, or the instance is using basic authorization</dd>
  242. <dt><span class="simpleTagLabel">Since:</span></dt>
  243. <dd>Twitter 2.0.0</dd>
  244. </dl>
  245. </li>
  246. </ul>
  247. <a name="getOAuthRequestToken--">
  248. <!-- -->
  249. </a>
  250. <ul class="blockList">
  251. <li class="blockList">
  252. <h4>getOAuthRequestToken</h4>
  253. <pre><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;getOAuthRequestToken()
  254. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  255. <div class="block">Retrieves a request token</div>
  256. <dl>
  257. <dt><span class="returnLabel">Returns:</span></dt>
  258. <dd>generated request token.</dd>
  259. <dt><span class="throwsLabel">Throws:</span></dt>
  260. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  261. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - access token is already available</dd>
  262. <dt><span class="simpleTagLabel">Since:</span></dt>
  263. <dd>Twitter4J 2.0.0</dd>
  264. <dt><span class="seeLabel">See Also:</span></dt>
  265. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | Twitter Developers</a>,
  266. <a href="http://oauth.net/core/1.0a/#auth_step1">OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token</a>,
  267. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/request_token">POST oauth/request_token | Twitter Developers</a></dd>
  268. </dl>
  269. </li>
  270. </ul>
  271. <a name="getOAuthRequestToken-java.lang.String-">
  272. <!-- -->
  273. </a>
  274. <ul class="blockList">
  275. <li class="blockList">
  276. <h4>getOAuthRequestToken</h4>
  277. <pre><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;getOAuthRequestToken(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;callbackURL)
  278. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  279. <div class="block">Retrieves a request token</div>
  280. <dl>
  281. <dt><span class="paramLabel">Parameters:</span></dt>
  282. <dd><code>callbackURL</code> - callback URL</dd>
  283. <dt><span class="returnLabel">Returns:</span></dt>
  284. <dd>generated request token</dd>
  285. <dt><span class="throwsLabel">Throws:</span></dt>
  286. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  287. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - access token is already available</dd>
  288. <dt><span class="simpleTagLabel">Since:</span></dt>
  289. <dd>Twitter4J 2.0.0</dd>
  290. <dt><span class="seeLabel">See Also:</span></dt>
  291. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | Twitter Developers</a>,
  292. <a href="http://oauth.net/core/1.0a/#auth_step1">OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token</a>,
  293. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/request_token">POST oauth/request_token | Twitter Developers</a></dd>
  294. </dl>
  295. </li>
  296. </ul>
  297. <a name="getOAuthRequestToken-java.lang.String-java.lang.String-">
  298. <!-- -->
  299. </a>
  300. <ul class="blockList">
  301. <li class="blockList">
  302. <h4>getOAuthRequestToken</h4>
  303. <pre><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;getOAuthRequestToken(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;callbackURL,
  304. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;xAuthAccessType)
  305. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  306. <div class="block">Retrieves a request token</div>
  307. <dl>
  308. <dt><span class="paramLabel">Parameters:</span></dt>
  309. <dd><code>callbackURL</code> - callback URL</dd>
  310. <dd><code>xAuthAccessType</code> - Overrides the access level an application requests to a users account. Supported values are read or write. This parameter is intended to allow a developer to register a read/write application but also request read only access when appropriate.</dd>
  311. <dt><span class="returnLabel">Returns:</span></dt>
  312. <dd>generated request token</dd>
  313. <dt><span class="throwsLabel">Throws:</span></dt>
  314. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  315. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - access token is already available</dd>
  316. <dt><span class="simpleTagLabel">Since:</span></dt>
  317. <dd>Twitter4J 2.2.3</dd>
  318. <dt><span class="seeLabel">See Also:</span></dt>
  319. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | Twitter Developers</a>,
  320. <a href="http://oauth.net/core/1.0a/#auth_step1">OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token</a>,
  321. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/request_token">POST oauth/request_token | Twitter Developers</a></dd>
  322. </dl>
  323. </li>
  324. </ul>
  325. <a name="getOAuthRequestToken-java.lang.String-java.lang.String-java.lang.String-">
  326. <!-- -->
  327. </a>
  328. <ul class="blockList">
  329. <li class="blockList">
  330. <h4>getOAuthRequestToken</h4>
  331. <pre><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;getOAuthRequestToken(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;callbackURL,
  332. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;xAuthAccessType,
  333. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;xAuthMode)
  334. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  335. <div class="block">Retrieves a request token</div>
  336. <dl>
  337. <dt><span class="paramLabel">Parameters:</span></dt>
  338. <dd><code>callbackURL</code> - callback URL</dd>
  339. <dd><code>xAuthAccessType</code> - Overrides the access level an application requests to a users account. Supported values are read or write. This parameter is intended to allow a developer to register a read/write application but also request read only access when appropriate.</dd>
  340. <dd><code>xAuthMode</code> - Set to reverse_auth to obtain a special request token to be used in the reverse auth process.</dd>
  341. <dt><span class="returnLabel">Returns:</span></dt>
  342. <dd>generated request token</dd>
  343. <dt><span class="throwsLabel">Throws:</span></dt>
  344. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  345. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - access token is already available</dd>
  346. <dt><span class="simpleTagLabel">Since:</span></dt>
  347. <dd>Twitter4J 2.2.3</dd>
  348. <dt><span class="seeLabel">See Also:</span></dt>
  349. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | Twitter Developers</a>,
  350. <a href="http://oauth.net/core/1.0a/#auth_step1">OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token</a>,
  351. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/request_token">POST oauth/request_token | Twitter Developers</a></dd>
  352. </dl>
  353. </li>
  354. </ul>
  355. <a name="getOAuthAccessToken--">
  356. <!-- -->
  357. </a>
  358. <ul class="blockList">
  359. <li class="blockList">
  360. <h4>getOAuthAccessToken</h4>
  361. <pre><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a>&nbsp;getOAuthAccessToken()
  362. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  363. <div class="block">Returns an access token associated with this instance.<br>
  364. If no access token is associated with this instance, this will retrieve a new access token.</div>
  365. <dl>
  366. <dt><span class="returnLabel">Returns:</span></dt>
  367. <dd>access token</dd>
  368. <dt><span class="throwsLabel">Throws:</span></dt>
  369. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable, or the user has not authorized</dd>
  370. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - when RequestToken has never been acquired</dd>
  371. <dt><span class="simpleTagLabel">Since:</span></dt>
  372. <dd>Twitter4J 2.0.0</dd>
  373. <dt><span class="seeLabel">See Also:</span></dt>
  374. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | dev.twitter.com - How long does an access token last?</a>,
  375. <a href="http://oauth.net/core/1.0a/#auth_step2">OAuth Core 1.0a - 6.2. Obtaining User Authorization</a>,
  376. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/access_token">POST oauth/access_token | Twitter Developers</a></dd>
  377. </dl>
  378. </li>
  379. </ul>
  380. <a name="getOAuthAccessToken-java.lang.String-">
  381. <!-- -->
  382. </a>
  383. <ul class="blockList">
  384. <li class="blockList">
  385. <h4>getOAuthAccessToken</h4>
  386. <pre><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a>&nbsp;getOAuthAccessToken(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;oauthVerifier)
  387. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  388. <div class="block">Retrieves an access token.</div>
  389. <dl>
  390. <dt><span class="paramLabel">Parameters:</span></dt>
  391. <dd><code>oauthVerifier</code> - OAuth verifier. AKA pin.</dd>
  392. <dt><span class="returnLabel">Returns:</span></dt>
  393. <dd>access token</dd>
  394. <dt><span class="throwsLabel">Throws:</span></dt>
  395. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable, or the user has not authorized</dd>
  396. <dt><span class="simpleTagLabel">Since:</span></dt>
  397. <dd>Twitter4J 2.0.0</dd>
  398. <dt><span class="seeLabel">See Also:</span></dt>
  399. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | dev.twitter.com - How long does an access token last?</a>,
  400. <a href="http://oauth.net/core/1.0a/#auth_step2">OAuth Core 1.0a - 6.2. Obtaining User Authorization</a>,
  401. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/access_token">POST oauth/access_token | Twitter Developers</a></dd>
  402. </dl>
  403. </li>
  404. </ul>
  405. <a name="getOAuthAccessToken-twitter4j.auth.RequestToken-">
  406. <!-- -->
  407. </a>
  408. <ul class="blockList">
  409. <li class="blockList">
  410. <h4>getOAuthAccessToken</h4>
  411. <pre><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a>&nbsp;getOAuthAccessToken(<a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;requestToken)
  412. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  413. <div class="block">Retrieves an access token associated with the supplied request token and sets userId.</div>
  414. <dl>
  415. <dt><span class="paramLabel">Parameters:</span></dt>
  416. <dd><code>requestToken</code> - the request token</dd>
  417. <dt><span class="returnLabel">Returns:</span></dt>
  418. <dd>access token associated with the supplied request token.</dd>
  419. <dt><span class="throwsLabel">Throws:</span></dt>
  420. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable, or the user has not authorized</dd>
  421. <dt><span class="simpleTagLabel">Since:</span></dt>
  422. <dd>Twitter4J 2.0.0</dd>
  423. <dt><span class="seeLabel">See Also:</span></dt>
  424. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | dev.twitter.com - How long does an access token last?</a>,
  425. <a href="http://oauth.net/core/1.0a/#auth_step2">OAuth Core 1.0a - 6.2. Obtaining User Authorization</a>,
  426. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/access_token">POST oauth/access_token | Twitter Developers</a></dd>
  427. </dl>
  428. </li>
  429. </ul>
  430. <a name="getOAuthAccessToken-twitter4j.auth.RequestToken-java.lang.String-">
  431. <!-- -->
  432. </a>
  433. <ul class="blockList">
  434. <li class="blockList">
  435. <h4>getOAuthAccessToken</h4>
  436. <pre><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a>&nbsp;getOAuthAccessToken(<a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth">RequestToken</a>&nbsp;requestToken,
  437. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;oauthVerifier)
  438. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  439. <div class="block">Retrieves an access token associated with the supplied request token and sets userId.</div>
  440. <dl>
  441. <dt><span class="paramLabel">Parameters:</span></dt>
  442. <dd><code>requestToken</code> - the request token</dd>
  443. <dd><code>oauthVerifier</code> - OAuth verifier. AKA pin.</dd>
  444. <dt><span class="returnLabel">Returns:</span></dt>
  445. <dd>access token associated with the supplied request token.</dd>
  446. <dt><span class="throwsLabel">Throws:</span></dt>
  447. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable, or the user has not authorized</dd>
  448. <dt><span class="simpleTagLabel">Since:</span></dt>
  449. <dd>Twitter 2.1.1</dd>
  450. <dt><span class="seeLabel">See Also:</span></dt>
  451. <dd><a href="http://oauth.net/core/1.0a/#auth_step2">OAuth Core 1.0a - 6.2. Obtaining User Authorization</a>,
  452. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/access_token">POST oauth/access_token | Twitter Developers</a></dd>
  453. </dl>
  454. </li>
  455. </ul>
  456. <a name="getOAuthAccessToken-java.lang.String-java.lang.String-">
  457. <!-- -->
  458. </a>
  459. <ul class="blockList">
  460. <li class="blockList">
  461. <h4>getOAuthAccessToken</h4>
  462. <pre><a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a>&nbsp;getOAuthAccessToken(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;screenName,
  463. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)
  464. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  465. <div class="block">Retrieves an access token associated with the supplied screen name and password using xAuth.<br>
  466. In order to get access acquire AccessToken using xAuth, you must apply by sending an email to api@twitter.com — all other applications will receive an HTTP 401 error. Web-based applications will not be granted access, except on a temporary basis for when they are converting from basic-authentication support to full OAuth support.<br>
  467. Storage of Twitter usernames and passwords is forbidden. By using xAuth, you are required to store only access tokens and access token secrets. If the access token expires or is expunged by a user, you must ask for their login and password again before exchanging the credentials for an access token.</div>
  468. <dl>
  469. <dt><span class="paramLabel">Parameters:</span></dt>
  470. <dd><code>screenName</code> - the screen name</dd>
  471. <dd><code>password</code> - the password</dd>
  472. <dt><span class="returnLabel">Returns:</span></dt>
  473. <dd>access token associated with the supplied request token.</dd>
  474. <dt><span class="throwsLabel">Throws:</span></dt>
  475. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable, or the user has not authorized</dd>
  476. <dt><span class="simpleTagLabel">Since:</span></dt>
  477. <dd>Twitter 2.1.1</dd>
  478. <dt><span class="seeLabel">See Also:</span></dt>
  479. <dd><a href="https://dev.twitter.com/docs/auth/oauth/faq">OAuth FAQ | dev.twitter.com - How long does an access token last?</a>,
  480. <a href="https://dev.twitter.com/docs/oauth/xauth">xAuth | Twitter Developers</a>,
  481. <a href="https://dev.twitter.com/docs/api/1.1/post/oauth/access_token">POST oauth/access_token | Twitter Developers</a></dd>
  482. </dl>
  483. </li>
  484. </ul>
  485. <a name="setOAuthAccessToken-twitter4j.auth.AccessToken-">
  486. <!-- -->
  487. </a>
  488. <ul class="blockListLast">
  489. <li class="blockList">
  490. <h4>setOAuthAccessToken</h4>
  491. <pre>void&nbsp;setOAuthAccessToken(<a href="../../twitter4j/auth/AccessToken.html" title="class in twitter4j.auth">AccessToken</a>&nbsp;accessToken)</pre>
  492. <div class="block">Sets the access token</div>
  493. <dl>
  494. <dt><span class="paramLabel">Parameters:</span></dt>
  495. <dd><code>accessToken</code> - accessToken</dd>
  496. <dt><span class="simpleTagLabel">Since:</span></dt>
  497. <dd>Twitter4J 2.0.0</dd>
  498. </dl>
  499. </li>
  500. </ul>
  501. </li>
  502. </ul>
  503. </li>
  504. </ul>
  505. </div>
  506. </div>
  507. <!-- ========= END OF CLASS DATA ========= -->
  508. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  509. <div class="bottomNav"><a name="navbar.bottom">
  510. <!-- -->
  511. </a>
  512. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  513. <a name="navbar.bottom.firstrow">
  514. <!-- -->
  515. </a>
  516. <ul class="navList" title="Navigation">
  517. <li><a href="../../overview-summary.html">Overview</a></li>
  518. <li><a href="package-summary.html">Package</a></li>
  519. <li class="navBarCell1Rev">Class</li>
  520. <li><a href="class-use/OAuthSupport.html">Use</a></li>
  521. <li><a href="package-tree.html">Tree</a></li>
  522. <li><a href="../../deprecated-list.html">Deprecated</a></li>
  523. <li><a href="../../index-all.html">Index</a></li>
  524. <li><a href="../../help-doc.html">Help</a></li>
  525. </ul>
  526. </div>
  527. <div class="subNav">
  528. <ul class="navList">
  529. <li><a href="../../twitter4j/auth/OAuthAuthorization.html" title="class in twitter4j.auth"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  530. <li><a href="../../twitter4j/auth/RequestToken.html" title="class in twitter4j.auth"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  531. </ul>
  532. <ul class="navList">
  533. <li><a href="../../index.html?twitter4j/auth/OAuthSupport.html" target="_top">Frames</a></li>
  534. <li><a href="OAuthSupport.html" target="_top">No&nbsp;Frames</a></li>
  535. </ul>
  536. <ul class="navList" id="allclasses_navbar_bottom">
  537. <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  538. </ul>
  539. <div>
  540. <script type="text/javascript"><!--
  541. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  542. if(window==top) {
  543. allClassesLink.style.display = "block";
  544. }
  545. else {
  546. allClassesLink.style.display = "none";
  547. }
  548. //-->
  549. </script>
  550. </div>
  551. <div>
  552. <ul class="subNavList">
  553. <li>Summary:&nbsp;</li>
  554. <li>Nested&nbsp;|&nbsp;</li>
  555. <li>Field&nbsp;|&nbsp;</li>
  556. <li>Constr&nbsp;|&nbsp;</li>
  557. <li><a href="#method.summary">Method</a></li>
  558. </ul>
  559. <ul class="subNavList">
  560. <li>Detail:&nbsp;</li>
  561. <li>Field&nbsp;|&nbsp;</li>
  562. <li>Constr&nbsp;|&nbsp;</li>
  563. <li><a href="#method.detail">Method</a></li>
  564. </ul>
  565. </div>
  566. <a name="skip.navbar.bottom">
  567. <!-- -->
  568. </a></div>
  569. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  570. <p class="legalCopy"><small>Copyright &#169; 2018. All rights reserved.</small></p>
  571. </body>
  572. </html>