我正在尝试在Chromebook上构建一个webapp,我需要它来使用ACR122U NFC读取RFID卡序列号.我正在使用chrome-nfc.
我正在愉快地读卡片,但我不知道如何在出示卡片时发射事件.
我是否可以使用chrome-nfc中的任何事件来了解卡片何时被呈现给读者?
编辑:我一直在尝试使用chrome.nfc.wait_for_tag,但它的行为并不像我期望的那样.
// With a card on the reader
chrome.nfc.wait_for_tag(device, 10000, function(tag_type, tag_id){
var CSN = new Uint32Array(tag_id)[0];
console.log ( "CSN: " + CSN );
});
[DEBUG] acr122_set_timeout(round up to 1275 secs)
DEBUG: InListPassiveTarget SENS_REQ(ATQA)=0x4, SEL_RES(SAK)=0x8
DEBUG: tag_id: B6CA9B6B
DEBUG: found Mifare Classic 1K (106k type A)
[DEBUG] nfc.wait_for_passive_target: mifare_classic with ID: B6CA9B6B
CSN: 1805372086
// with no card on the reader
chrome.nfc.wait_for_tag(device, 10000, function(tag_type, tag_id){
var CSN = new Uint32Array(tag_id)[0];
console.log ( "CSN: …Run Code Online (Sandbox Code Playgroud) 我试图迭代给定{media_id}的每个用户ID
https://api.instagram.com/v1/media/ {media-id}/likes?access_token = ACCESS-TOKEN
正在返回这样的东西(大约300个喜欢的数据数组)
{
"data": [{
"username": "jack",
"first_name": "Jack",
"last_name": "Dorsey",
"type": "user",
"id": "66"
},
{
"username": "sammyjack",
"first_name": "Sammy",
"last_name": "Jack",
"type": "user",
"id": "29648"
}]
}
Run Code Online (Sandbox Code Playgroud)
问题是它不会返回所有喜欢或任何分页功能.
是否有任何解决方法可以获得给定{media_ID}的所有喜欢?