Giter VIP home page Giter VIP logo

fbrs's People

Contributors

aldonline avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fbrs's Issues

Get as many fields per request as possible

see if we can get more fields per ObjectDocument ( with the fields=... parameter )
having too many triples is rarely an issue for the size of subgraphs we are downloading.

Cleanup malformed (empty) IDs returned by the Graph API

For some reason the Graph API may return blank IDs for some properties
For example:

"hometown": {
      "id": "", <----- LIKE THIS ONE
      "name": null
   },



curl -H "Accept: text/turtle" -X GET "https://graph.facebook.com/555010177?access_token=AAAAAAITEghMBAEYd3iIfZCejGIA23hJeOMeQvvxBvkbMV9T0IxVCedWa1YCauWh90i6gmkcWmjnKQYLMZBatZC1JoPM7ZCBBfogkXXs9hAZDZD"

In Turtle, this results in the following triples

</555010177#> user:hometown </#> ;

And then:

</#> :id "" ; :name "" .

Therefore, it is safe to assume that all triples that contain the following
URI on any poisition are invalid:

<http://graph.facebook.com/#>

The following SPARQL query takes care of this issue

delete from <urn:divetouch:graph:facebook:friends>
  { ?s ?p ?o }
where
  { graph <urn:divetouch:graph:facebook:friends>
      { ?s ?p ?o .
        filter ( ?s = <http://graph.facebook.com/#> || ?o = <http://graph.facebook.com/#> ) 
      }
  }

or, when you don't know the graph:

delete from ?g
  { ?s ?p ?o }
where
  { graph ?g
      { ?s ?p ?o .
        filter ( ?s = <http://graph.facebook.com/#> || ?o = <http://graph.facebook.com/#> ) 
      }
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.