I have an PHP script with fql_query and for some days it's giving following error :
rest api is deprecated for versions v2.1 and higher
So, I want to use Graph SDK v2.0 But i don't know how to use it. I read somewhere that we need to use V2.0 somewhere on script to do that.
Can anyone please help me solve the issue. It'll be much appreciated. Thanks.
I guess you're using the endpoint https://api.facebook.com/, instead of using https://graph.facebook.com/fql?q={your_fql_query}&access_token={access_token} as outlined at
https://developers.facebook.com/docs/technical-guides/fql/#example
If your app is a Graph API v2.1 app, you won't be able to use FQl anymore. If it's a Graph API v2.0 app, you'll be able to use FQL until April 30th 2016.
The simplest way is, as opposed to asking ('/me') make a request for ('/v2.0/me') by specifying the version number before the call.
See "making versioned requests" on this page : https://developers.facebook.com/docs/apps/versions and https://developers.facebook.com/docs/graph-api/quickstart/v2.1#versions
But you also need to note that if you App was created AFTER 2.1 was released, then you can't go backwards and use 2.0; you can only use 2.0 if you app was created before 2.1 was released; and then you only have 2 years to update it to be 2.1 compliant.
Related
I've been implementing PHP getstream.io support for our app, found that the official PHP library is lacking compared to Python one.
Checking official api refs on getstream.io site - seems they are not full by any means as well.
For example - we have 'stats/follow/' endpoint, allowing to get following/followers counts easily, quite a common thing to use for user profiles. I found it by reading python lib. But it is not documented at all on the official site, there are no mentions it even exists.
Am I looking for the full api refs in the wrong place (on getstream.io official site)?
Maybe there are a lot of other useful endpoints I am not aware of, as they are not present in the official refs?
stats/follow is a recent addition (beta right now) which isn't added to PHP SDK at the moment. PRs are always welcome (good to imitate Python SDK). Anyway, it will be added though, just a matter of time.
REST docs will be auto generated in near future.
I am using Google API client 2.0 and want to upgrade Google drive API from V1 to V2 to newer. I not found any straight forward way to upgrade version. Only the change log from google developer site found. Please tell me upgrade process guideline or step by step process.
Thanks in advance.
I am not sure i understand your question. Are you using the V2 of the Google drive api and now you want to upgrade to Google Drive V3? There are a lot of changes your going to have to make I don't think there are any guides on how to do it. Assuming you are using the Google PHP client library your best option will be to download the library for v3 and start fixing your errors one at a time. Like i said there are a number of changes in the library mainly title vs name. That and the library doesn't by default return all the fields your going to have to start using the field parameter.
When you download the library with composer you will be downloading the latest code for use with the Drive API v3. The Authencation code you have been using probably hasnt changed. All of the methods you use in drive probably have. Drive.php
Again there is no upgrade function for this its a completely different API. There is no way to upgrade it. You download the new class using composer and change your code as needed
I have struggled with google's php library, the latest version of which is available on their own website. While the simple google plus example they provide works fine (it's a basic login with GET features), there is no way to add a moment activity via app in php - at least not for me.
Their own example isn't working (the example can be retrievd in the library: examples/moments/simple.php)
Someone provides an answer here but the button demo they provide isn't working either if I press (authorization is fine, posting produces no action.
Does anyone have a suggestion on how to change their own php file so to make it work? I tired removing all the code and resetting it to the basic action: at least I am not getting oauth or php errors, but the file produces no action.
I understand that posting moments in php is not currently supported, but I have a web app and android implementation wouldn't work for me I think.
At the moment you need to get the library from the trunk, you can find instructions here.
This gist documents how to request permission and write activities.
The old moments api has been deprecated and those samples are for the old API, I'll remove them from the codebase as soon as possible. Thanks for raising this question!
According to the Google's documentation, the AuthSub method is officially deprecated in place of OAuth 2.0. The problem is, their PHP library v2 is built using Zend Gdata, which from what I can tell, doesn't work well with OAuth. On the other hand, v3 of their API is not only still in development, but it looks like it doesn't support YouTube calls quite yet.
So my question is, what's the best way to make API calls using v2 of the library after authenticating using OAuth2? Am I best just using AuthSub until a new library comes out?
You can actually call the Youtube api with the the v3 php library. You can find code samples here.
Does anyone have an API library for google calendar API, version 2? - http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html
There is a zend library here: http://framework.zend.com/manual/en/zend.gdata.calendar.html but it is based on version 1 of the api.
A simple google search has not yielded any results: http://www.google.com.au/search?q=calendar+api+2+php&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Thanks
Version 2.0 of the API is a lot more restricted in the amount of languages available and PHP is not one of them. You can use version 1 which still works perfectly well, or you can switch to one of the languages where v2 is available, like python.