This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$testObject = array( | |
array( | |
"id"=> 1, | |
"parentID"=> 1, | |
"insuCount"=> 4522, | |
"totalInsuCount"=> '', | |
"childrenCount" => '' | |
), | |
array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//schemas: | |
User: { | |
name: String | |
age: Number | |
email: String | |
defaultAddress: { | |
type: Schema.Types.ObjectId, | |
ref: 'Address' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <FBSDKCoreKit/FBSDKCoreKit.h> | |
#import <FBSDKLoginKit/FBSDKLoginKit.h> | |
#import "RCTFBLogin.h" | |
#import "RCTLog.h" | |
@implementation RCTFBLogin | |
{ | |
FBSDKLoginButton *_loginButton; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RCT_EXPORT_METHOD(login:(NSString *)clientId redirectUrl:(NSString *)redirectUrl clientSecret:(NSString *)clientSecret state:(NSString *)state scopes:(NSArray *)scopes) | |
{ | |
self.clientId = clientId; | |
self.redirectUrl = redirectUrl; | |
self.clientSecret = clientSecret; | |
self.state = state; | |
self.scopes = scopes; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// LinkedinStorage.m | |
// SydTechEco | |
// | |
// Created by yanivkalfa on 3/13/16. | |
// Copyright © 2016 Facebook. All rights reserved. | |
// | |
#import "LinkedinStorage.h" | |
#import <Foundation/Foundation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location date:(NSNumber *)secondsSinceUnixEpoch) | |
{ | |
NSDate *date = [RCTConvert NSDate:secondsSinceUnixEpoch]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RCT_EXPORT_METHOD(login:(NSString *)clientId redirectUrl:(NSString *)redirectUrl clientSecret:(NSString *)clientSecret state:(NSString *)state scopes:(NSArray *)scopes callback:(RCTResponseSenderBlock)callback) | |
{ | |
self.clientId = clientId; | |
self.redirectUrl = redirectUrl; | |
self.clientSecret = clientSecret; | |
self.state = state; | |
self.scopes = scopes; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *err = [ NSString stringWithFormat:@"Quering accessToken failed %@",error ]; | |
NSLog(err); | |
callback(@[err, [NSNull null]]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSTimeInterval expiresOn = [[[ NSUserDefaults standardUserDefaults ] objectForKey:@"expires_in"] doubleValue]; | |
[manager POST:url parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
NSMutableDictionary * resp = [responseObject mutableCopy]; | |
[resp setObject:accessToken forKey:@"access_token"]; | |
[resp setObject:expiresOn forKey:@"expires_in"]; // error | |
NSLog(@"JSON: %@", responseObject); | |
callback(@[[NSNull null],responseObject]); | |
return [self.bridge.eventDispatcher sendDeviceEventWithName:@"linkedinGetRequest" | |
body:responseObject]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[manager GET:url parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
NSMutableDictionary * resp = [responseObject mutableCopy]; | |
[resp setObject:accessToken forKey:@"access_token"]; | |
[resp setObject:expiresOn forKey:@"expires_in"]; | |
NSLog(@"JSON: %@", resp); | |
callback(@[[NSNull null],resp]); | |
return [self.bridge.eventDispatcher sendDeviceEventWithName:@"linkedinGetRequest" | |
body:resp]; | |
{ |
OlderNewer