I've downloaded the Google API Client and installed it on my Server. I set up my API and my client ID.
I configured the PHP file and now I'm trying to open it:
http://euotm.net/google-api-php-client/examples/calendar/simple.php
I signin using a Google Account, but then all I get is a code.
WHy does that happen? I need it to show a calendar.
I'm new to this API, so I really don't know much.
Thanks ahead,
Tom.
Indeed google calendar api doesn't provide a display widget to integrate calendar to your application. The api only gives you the possibility to retrieve every details about your calendars and their events, and then you'll have to find a way to display it on your screen if you want a nice layout.
have you
require_once 'google-api-php-client/src/Google_Client.php';
require_once 'google-api-php-client/src/contrib/Google_CalendarService.php';
these files in your code ? i think you may miss it. what error, you are getting kindly make more sense about this
I am having the same issue. From what I've found so far, it looks like RadASM is right, but I was wondering what you moved on to in terms of which widget/gadget you used to display your actual calendar.
If you haven't found it yet, you may be looking for this:
https://developers.google.com/google-apps/calendar/gadgets/event/
Please let me know what you went with.
RadASM is right. Google Calendar API provides well structured data for the calendars and calendar events, allowing data manipulation, too. Desiring your custom layout, you need to take care of it.
Here is a detailed explanatory article with full demo code within a single HTML file - Easy and compact access to your Google calendars.
Related
I have a professional website using Google Analytics for metrics and I try to automatize one task I used to do manually but.. not able to understand if it's possible ?!
I just began to using the Google PHP client library to access the Google Analytics API on my website Test with the HelloAnalytics.php file is OK, I manage to connect and retrieve my data.
What i'm trying to do is :
Get all URLs viewed in the past 24H (what you can see when you navigate in the GA dashboard -> Behavior -> Site content -> All pages)
Combine those datas with my custom Definition which is in fact a special token i generate for every users on my website via PHP, then send it thought with Javascript and ga('set', 'mycustomdefinition', 'my token');
Is it possible ?
Many thanks in advance for your support !
Data under 24-48 hours old has probably not completed processing so I recommend not looking at data viewed in the last 24 hours it wont be correct. Other wise yes you can see this.
Assuming you mean custom Dimension yes you can extract custom dimensions and the page path in the same request.
You might want to have a look at the Dimensions & metrics explorer as well as the google analytics query explorer both will help you understand what data can be extracted from the API.
So I am trying to figure out if I can create a simple custom PHP script that takes data from a google hangout link and displays back if it is in session.
I am pretty new to Google APi's. My end goal is to create a button on a website that appears whenever someone has joined into a certain designated HANGOUT link.
Do you think this is possible? Any advice would be highly appreciated.
Here was I was thinking:
$stuff = strip_tags(file_get_contents("https://hangouts.google.com/hangouts/_/4im2yhs5kry4vjhlu4yop25tsea"));
$eStrings = explode(' ', $stuff);
I would then retrieve the data from the code and see if it is live or not. If at top of the screen it reads: "You are the only one here" then it is automatically assumed that the session has not begun.
Problem=> You get directed to the google login screen because you need user access.
If anyone has ideas please advise.
While there is a PHP API SDK for Google in beta, it doesn't appear to support Hangouts at all. Google does however expose a client-side JavaScript interface for Hangouts that you should be able to emit and use from your PHP server-side code.
Using the JS interface, you could use the gapi.hangout.onParticipantsChanged event notification for a given Hangout to know when someone has joined.
Then leverage the gapi.hangouts.getParticipants() function to pull a list of who's in the hangout and determine if your button should show for the current user.
I would like to know whether there is any way to crawl the google play store using package url in core php. I want to get the app rating and icon of the particular package url from the play store.
Can anyone help me to do this..??
Check out https://42matters.com/api/lookup They have an open source api that should return just about anything you want and return it in a JSON format. It also has an iOS part as well if you want to crawl that as well!
After you register on the website you will be provided with an Access Token. You need this to build your requests. To get the data on an specific package name, you build the link as this:
https://42matters.com/api/1/apps/lookup.json?access_token=?&p=
NOTE: It must be the PACKAGE NAME, not the title of the app, for example, the package name of Clash of Clans is com.supercell.clashofclans. You can obtain the package name by performing a search through their website as well. That link would be built as such:
https://42matters.com/api/1/apps/search.json?access_token=?q= Where query would be clash of clans!
If you use Google Chrome, give PostMan a try, its great for testing API's!
Hopefully this helps you out, if you need anymore help, let me know and I'll be glad to help you!
So a while back I used to use the twitter json search in one of my apps but it seems since the change in API versions there has been some major changes which even after reading the documentation I still can't get my head around and it really doesn't make it very easy to understand so hopefully one of you tech guys out there can help me out.
I want to clean my application up so it works again in plainly doing the following:-
http://search.twitter.com/search.json?
q='+param+'&
rpp=100&
result_type=recent&
lang=en
Obviously with the changes this is no longer possible but I want to be able to do this again using the new address but in JQuery unless someone can suggest either a tutorial or a piece of code or even a link to a topic where I could get my answer. I'm also open to using PHP as this is what I used at one point with searching Facebook's timeline and you can get an access token using $.get() for Facebook so surely it would be the same with Twitter too?
Any advice/code is welcome.
Thanks!
the search API needs authorization now. I'd say that, first off, you need to call the https url not http.
With Abhramam William's library you'd do something like the following, after having received your app's bearer token:
$your_tweets = $connection->get("https://api.twitter.com/1.1/search/tweets.json?q=from:grey_mina&result_type=recent&count=5");
I've been playing with the samples from this site: http://code.google.com/intl/sv-SE/apis/calendar/v3/using.html
All I want to do fetch the cal data from a public calendar. But so far there's always something that makes me hit a wall. I'm doing a webapp but it always pointing to a specific calendar that is public. I don't need to use oauth. only the api key. But I really can't find any samples of doing this.
Any hint to get me in the right direction. I don't even know what to try after trying the samples on that page.
see actually how it processed using oauth here.
https://code.google.com/oauthplayground/
you can get step to implement this.
you have to use
https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}