userinfo

Get Userinfo from Oauth2 Google Contacts API

自闭症网瘾萝莉.ら 提交于 2019-11-29 10:27:29
Error which i am getting: com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized { "code" : 401, "errors" : [ { "domain" : "global", "location" : "Authorization", "locationType" : "header", "message" : "Invalid Credentials", "reason" : "authError" } ], "message" : "Invalid Credentials" } Below code, i am using: GoogleCredential credential = new GoogleCredential.Builder() .setTransport(this.TRANSPORT).setJsonFactory(this.JSON_FACTORY) .setClientSecrets(Constants.CLIENT_ID, Constants.CLIENT_SECRET).build(); credential.setAccessToken(tokenResponse.getAccessToken());

Swift read userInfo of remote notification

怎甘沉沦 提交于 2019-11-28 05:13:33
I implemented a function to open an AlertView when I receive a remote notification like this: func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]){ var notifiAlert = UIAlertView() var NotificationMessage : AnyObject? = userInfo["alert"] notifiAlert.title = "TITLE" notifiAlert.message = NotificationMessage as? String notifiAlert.addButtonWithTitle("OK") notifiAlert.show() } But NotificationMessage is always nil. My json payload looks like this: {"aps":{"alert":"Testmessage","badge":"1"}} I am using Xcode 6, Swift and I am developing for

How to get user image through user id in Google plus?

為{幸葍}努か 提交于 2019-11-28 00:03:09
I used to get user image through this URL https://plus.google.com/s2/photos/profile/(user_id)?sz=150 but now what all I am getting is 404 error or no image. I know google has changed its policies and way it connects and allows other to get information, but I didn't anything to achieve same result as above. Note: I can't use authenticate thing here since I am showing image of users to other users which are not connected at all. OR in other way user may be not coming from Google log-in but I need to show other Google users images only. Any help would be highly appreciated!!! Edit: I have checked

How to add userInfo to a UIAlertView?

时光毁灭记忆、已成空白 提交于 2019-11-27 07:08:10
I would like to know how to add a userInfo object, or any NSDictionary, to a UIAlertView? Thank you. If you are on > iOS 4.0 (for blocks) and you only want one or two buttons, you could use this category I made: https://github.com/rsaunders100/UIAlertView-Blocks It bypasses the need to add user info since you put your click handeling function straight into the alert. e.g. #import UIAlertView+Blocks.h ... ... NSString* myUserInfo = @"example"; [UIAlertView displayAlertWithTitle:@"Example Alert View With Blocks" message:nil leftButtonTitle:@"Ok" leftButtonAction:^{ NSLog(@"%@", myUserInfo); }

Swift read userInfo of remote notification

安稳与你 提交于 2019-11-27 00:41:31
问题 I implemented a function to open an AlertView when I receive a remote notification like this: func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]){ var notifiAlert = UIAlertView() var NotificationMessage : AnyObject? = userInfo["alert"] notifiAlert.title = "TITLE" notifiAlert.message = NotificationMessage as? String notifiAlert.addButtonWithTitle("OK") notifiAlert.show() } But NotificationMessage is always nil. My json payload looks like

How to get user image through user id in Google plus?

蹲街弑〆低调 提交于 2019-11-26 21:39:23
问题 I used to get user image through this URL https://plus.google.com/s2/photos/profile/(user_id)?sz=150 but now what all I am getting is 404 error or no image. I know google has changed its policies and way it connects and allows other to get information, but I didn't anything to achieve same result as above. Note: I can't use authenticate thing here since I am showing image of users to other users which are not connected at all. OR in other way user may be not coming from Google log-in but I