call_api not working with proper credentials - google-analytics

I am using this line:
call_api($_SESSION['sessionToken'],"https://www.google.com/analytics/feeds/accounts/default");
to get the details of my Google Analytics but it returns nothing. when i try to open:
https://www.google.com/analytics/feeds/accounts/default, it returns a 404 page, where can i see any changes on the Google Analytics API?
since is seems that a recent change on their part is causing this problem.
would someone be kind enough to explain this to me. or is it because of some changes on Google Analytic?
thank you :)

I'm not sure how old is your code. It seems to be using version 2.3 of the API
The current working versions are 2.4 and 3. Version 2.3 doesn't work anymore.
Here's the documentation for the latest version of the API.
https://developers.google.com/analytics/devguides/config/mgmt/v3/
And here's the changelog for the management API.
https://developers.google.com/analytics/community/mgmt_changelog
Here is a guide on migrating from 2.3 to 2.4. But you are encouraged to move to 3.0, some features only work on 3.0
https://developers.google.com/analytics/resources/articles/gdata-migration-guide
https://developers.google.com/analytics/devguides/config/mgmt/v2/#whatsnew

Related

Ms graph API v1.0: HideForUser and a few other methods do not show up in .Net 5

though the docs here (https://learn.microsoft.com/en-us/graph/api/chat-hideforuser?view=graph-rest-1.0&tabs=http) said we could use them, with c# sample code too, but we don't see them at all after having added the sdk to the project. Note we are already able to add new chat with members and fetch messages.
a few others too that have same issue:
https://learn.microsoft.com/en-us/graph/api/chat-unhideforuser?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/api/chat-markchatreadforuser?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/api/chat-markchatunreadforuser?view=graph-rest-1.0&tabs=http
is there any dependency or steps we missed?
resolved the problem -- somehow the version (4.34.0) I used was out of date, and the latest version 4.49.0 does have these APIs

Signification of "https://maps.googleapis.com/maps/api/js?v=3" in term of the used Google Map API version

What is the signification of "https://maps.googleapis.com/maps/api/js?v=3" in term of the used Google Map API version?
In the Google Map documentation, it defines v=n.mm with by examples v=3.34 or v=3.35.
But nothing explains when you use v=3.
What does it mean please?
That used to be how google suggested requesting the "release" version of the API (before the weekly/quarterly versions were added).
from an old version of the documentation on archive.org:
For regular applications
We recommend specifying v=3 in your bootstrap request. This means that you always get the current release version of the Google Maps JavaScript API that has already been subjected to a large volume of traffic and had necessary bug fixes applied. In most cases you should expect that no action is necessary when a version rolls over.

Xamarin.forms and Azure AD B2C - missing PublicClientApplication.PlatformParameters?

I've been following along with Mayur Tendulkar's blog post: Authenticate Mobile Apps Using Microsoft Authentication Library, but it seems like the article may be out of date with the current version of the library. (Latest version of Microsoft.Identity.Client seems to be 1.1.0-preview.
The code in the sample refers to an IPlatformParameters interface, and a property of PublicClientApplication, PlatformParameters.
Neither of which seem to be present in this library.
This has changed since the last updates. follow this link.
MSAL, this has been replaced with "UIParent". hope this helps

CQ5 Using Client Libraries (CQ5.3)

I'm again coming up against problems after picking up some tasks on CQ 5.3 but having used nothing but 5.6 before this.
My problem is with client libraries:
In CRXDE Lite in CQ 5.3 I went and set up my client libraries as I normally would at component level and /etc/designs/<project> level (using type cq:ClientLibraryFolder), however after including the line <cq:includeClientLib css="my.category"/> I got a jsp error stating the tag was not defined.
Sure enough, after a quick Google I found this tag wasn't introduced until 5.4, so my question(s) are:
How do you use client libraries in CQ 5.3?
If the answer to #1 is "you can't" then why on earth is the option available to set them up present in 5.3 CRXDE Lite?
Internet searches have turned up no information (or I'm searching for the wrong thing), hence my question here.
Thanks in advance
Yes, the cq:includeClientLib tag was introduced in 5.4 only.
But even without that you can include your clientlibs using the com.day.cq.widget.HtmlLibraryManager service.
The tag was just a convenience wrapper around this service interface.
HtmlLibraryManager htmlMgr = sling.getService(HtmlLibraryManager.class);
if (htmlMgr != null) {
htmlMgr.writeCssInclude(slingRequest, out, "my.category");
}
Refer HtmlLibraryManager API docs for the other methods that are provided.

How can I resolve a Google Maps API key Issue?

I have been having trouble with the Google Maps API for one week now and I'm unable to resolve it :(
I have a site that has been using the Google Maps v3 for several weeks now without any issues. But suddenly, it starts complaining that: Google has deactivated the use of the Google Maps API for this application, because the offered key is not a valid Google-API-Key or the use of Google Maps v3 is not allowed for this site.
I double checked everything, including: trying a new key; checking domain restrictions and activation in the API-console - Everything is alright.
I'm using simple authentication. Every help would be highly appreciated :)
The Version Handling Has Changed. This Code Is No Longer Valid (see the code below in the update):
One thing you can do immediately to bypass such problems: explicitly set the version of the API you are using to 3.6:
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?v=3.6&sensor=false">
</script>
Keys were introduced in 3.7, so you do not get any warnings if you set your version to: 3.6.
Important Update That Makes the JavaScript Code Above Invalid:
Setting the version to 3.6 will no longer function as a work-around for this, because you are no longer able to request version 3.6. You should not use the code above, but should use the following code to load the Google Maps JavaScript 3.8 library:
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?v=3.8&sensor=false">
</script>
Google recently announced a version update; here is the content of the Google announcement email:
We recently released a new minor version of the Google Maps API. This
means that the versions are now:
3.9: Development/Nightly
3.8: Feature Stable
3.7: Frozen
3.6 has been removed: if you request it you will receive 3.7.
In this latest release of 3.9, we've added:
* Country restriction for Autocomplete (AutocompleteOptions?.componentRestrictions)
* Regions and Cities type filters
You will also get all the features of 3.8 (now Feature Stable),
including:
WeatherLayer and CloudLayer
Click-to-go/Click-to-zoom in Street View
orderBy, limit and offset for FusionTablesLayer
utc_offset and opening_hours in PlaceResult
google.maps.geometry.poly.containsLocation() and isLocationOnEdge()
DemographicsLayer (Maps for Business only)

Resources