Created
          October 8, 2016 01:41 
        
      - 
      
- 
        Save PseudoSky/ea325b618237aba15f840a8f441a7004 to your computer and use it in GitHub Desktop. 
    Facebook Graph API Crawl (throttled)
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function store(url,v){ | |
| window.localStorage[url]=v; | |
| } | |
| var query= _.throttle(function getPage(url){ | |
| $http.get(url).then( d => { | |
| store(url,JSON.stringify(d)); | |
| if(d.data.paging && d.data.paging.next){ | |
| getPage(d.data.paging.next); | |
| } | |
| } | |
| ) | |
| }, 1500); | |
| query('https://graph.facebook.com/v2.3/1496409335/inbox?limit=25&format=json&access_token=******'); | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment