Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FBSDKLoginButton.h « Headers « FBSDKLoginKit.framework « 3party « Maps « iphone - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: adc7b9b095025cdabd4f7b9085828514692716a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#import <UIKit/UIKit.h>

#import <FBSDKCoreKit/FBSDKButton.h>

#import <FBSDKLoginKit/FBSDKLoginManager.h>

#import "FBSDKTooltipView.h"

@protocol FBSDKLoginButtonDelegate;

/**
 NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior)
  Indicates the desired login tooltip behavior.
 */
typedef NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior)
{
  /** The default behavior. The tooltip will only be displayed if
   the app is eligible (determined by possible server round trip) */
  FBSDKLoginButtonTooltipBehaviorAutomatic = 0,
  /** Force display of the tooltip (typically for UI testing) */
  FBSDKLoginButtonTooltipBehaviorForceDisplay = 1,
  /** Force disable. In this case you can still exert more refined
   control by manually constructing a `FBSDKLoginTooltipView` instance. */
  FBSDKLoginButtonTooltipBehaviorDisable = 2
};

/**
  A button that initiates a log in or log out flow upon tapping.

 `FBSDKLoginButton` works with `[FBSDKAccessToken currentAccessToken]` to
  determine what to display, and automatically starts authentication when tapped (i.e.,
  you do not need to manually subscribe action targets).

  Like `FBSDKLoginManager`, you should make sure your app delegate is connected to
  `FBSDKApplicationDelegate` in order for the button's delegate to receive messages.

 `FBSDKLoginButton` has a fixed height of @c 30 pixels, but you may change the width. `initWithFrame:CGRectZero`
 will size the button to its minimum frame.
*/
@interface FBSDKLoginButton : FBSDKButton

/**
  The default audience to use, if publish permissions are requested at login time.
 */
@property (assign, nonatomic) FBSDKDefaultAudience defaultAudience;
/**
  Gets or sets the delegate.
 */
@property (weak, nonatomic) IBOutlet id<FBSDKLoginButtonDelegate> delegate;
/**
  Gets or sets the login behavior to use
 */
@property (assign, nonatomic) FBSDKLoginBehavior loginBehavior;
/**
  The publish permissions to request.


 Use `defaultAudience` to specify the default audience to publish to.
 Note this is converted to NSSet and is only
 an NSArray for the convenience of literal syntax.
 */
@property (copy, nonatomic) NSArray *publishPermissions;
/**
  The read permissions to request.


 Note, that if read permissions are specified, then publish permissions should not be specified. This is converted to NSSet and is only
 an NSArray for the convenience of literal syntax.
 */
@property (copy, nonatomic) NSArray *readPermissions;
/**
  Gets or sets the desired tooltip behavior.
 */
@property (assign, nonatomic) FBSDKLoginButtonTooltipBehavior tooltipBehavior;
/**
  Gets or sets the desired tooltip color style.
 */
@property (assign, nonatomic) FBSDKTooltipColorStyle tooltipColorStyle;

@end

/**
 @protocol
  A delegate for `FBSDKLoginButton`
 */
@protocol FBSDKLoginButtonDelegate <NSObject>

@required
/**
  Sent to the delegate when the button was used to login.
 - Parameter loginButton: the sender
 - Parameter result: The results of the login
 - Parameter error: The error (if any) from the login
 */
- (void)loginButton:(FBSDKLoginButton *)loginButton
didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result
                error:(NSError *)error;

/**
  Sent to the delegate when the button was used to logout.
 - Parameter loginButton: The button that was clicked.
*/
- (void)loginButtonDidLogOut:(FBSDKLoginButton *)loginButton;

@optional
/**
  Sent to the delegate when the button is about to login.
 - Parameter loginButton: the sender
 - Returns: YES if the login should be allowed to proceed, NO otherwise
 */
- (BOOL) loginButtonWillLogin:(FBSDKLoginButton *)loginButton;

@end