[ALOY-1546] Alloy.builtins.social: Unable to get Twitter user info
| GitHub Issue | n/a |
|---|---|
| Type | Story |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2018-12-04T15:27:20.000+0000 |
| Affected Version/s | alloy 1.9.5 |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Nazmus Salahin |
| Assignee | Feon Sua Xin Miao |
| Created | 2017-03-12T17:25:11.000+0000 |
| Updated | 2018-12-04T15:27:20.000+0000 |
Description
Hi,
We are trying to get Twitter user info using following documentation:
http://docs.appcelerator.com/platform/latest/#!/api/Alloy.builtins.social
Steps :
1. Create a simple alloy project.
2. Add following code:
var social = require('alloy/social').create({
consumerSecret :'yyy',
consumerKey : 'zzzz'
});
function doClick(e) {
if (!social.isAuthorized()) {
social.authorize(function(e) {
alert(JSON.stringify(e));
});
}
}
$.index.open();
3. After Authorize apps.
[^0-sa-d2-9e99ac3363469698d457463077931f46.jpg]
4. It said enter that pin number
!Screenshot_20170312-231225.png|thumbnail!
5. Where to put that pin number ?
Attachments
| File | Date | Size |
|---|---|---|
| 0-sa-d2-9e99ac3363469698d457463077931f46.jpg | 2017-03-12T17:27:37.000+0000 | 84011 |
| Screenshot_20170312-231225.png | 2017-03-12T17:27:38.000+0000 | 203296 |
Hi, Is there any update on this issue?
On Android, evalJS returns following error:
Looks like there's no way the builtins can scrape auth PIN from the page. One possible solution is to add an input box for users to key in the pin, though this will change user experience completely.Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src https://abs.twimg.com https://abs-0.twimg.com https://twitter.com https://mobile.twitter.com".