-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.js
More file actions
33 lines (33 loc) · 990 Bytes
/
Copy pathapp.js
File metadata and controls
33 lines (33 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var access_token = 'EAASIjnu3HS8BADme5rhMLYmH0mvKMHoniHgdSx4AbVVxjiIfXjOep4Kgo4lyIe2rUf5VX6kxuJ9xAj4ZAXrUcZCpomWGRy8OZClDZCzh3y9V7TQj9ydlbX2Na7vMTDBwBV4w08uluCkEhm32An8e7tI9SsUZC02irS6f1KVWkiwZDZD'
var urla = 'https://graph.facebook.com/v2.10/NetworkKMUTNB/feed?fields=full_picture%2Ccreated_time%2Cname&limit=10&access_token='+access_token
new Vue({
el: '#app',
data: {
result: 'test',
url:urla,
check:0,
temp:urla
},
methods: {
getApi: function () {
var vm = this
this.$http.get(this.url).then(function (res) {
vm.result = JSON.parse(res.data).data
vm.url = JSON.parse(res.data).paging.next
if (typeof(vm.url) == "undefined")
vm.url=vm.temp
console.log(vm.url)
})
},
page: function () {
location.href='https://www.facebook.com/NetworkKMUTNB/?fref=ts'
}
},
ready: function () {
this.getApi()
var v = this
setInterval(function () {
v.getApi()
}, 10000)
}
})