facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

using filters with GraphRequestManager #662

Closed asela-wijesinghe closed 4 years ago

asela-wijesinghe commented 4 years ago

I have a query which should only filter out images from Instagram gallery, but apart from images there are videos coming as well. how do I filter my query using the given parameters ?

parameters: {
      media_type: {
      string: "IMAGE"
      },
      fields: {
        string: 'id,media_url,media_type' // what you want to get
      },
      limit: {
        string: maxLoad.toString()
      },
      access_token: {
        string: permanentAccessToken.toString() // put your accessToken here
      }
    }

I tried this but there was no filter applied to the query.

    media_type: {
      string: "IMAGE"
      },

With and without this the result is both same.

gmertk commented 4 years ago

Hi @asela-wijesinghe, I think filtering isn't supported by the underlying Instagram Graph API, so this isn't really about the React Native SDK. Such a query isn't possible even from the Graph API Explorer https://developers.facebook.com/tools/explorer/ Cheers!