commit | author | age
|
bad748
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
W |
2 |
// |
|
3 |
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
|
4 |
// copy, modify, and distribute this software in source code or binary form for use |
|
5 |
// in connection with the web services and APIs provided by Facebook. |
|
6 |
// |
|
7 |
// As with any software that integrates with the Facebook platform, your use of |
|
8 |
// this software is subject to the Facebook Developer Principles and Policies |
|
9 |
// [http://developers.facebook.com/policy/]. This copyright notice shall be |
|
10 |
// included in all copies or substantial portions of the software. |
|
11 |
// |
|
12 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
14 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
15 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
16 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
17 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
18 |
|
|
19 |
#import <Foundation/Foundation.h> |
|
20 |
|
|
21 |
#import <FBSDKCoreKit/FBSDKCopying.h> |
|
22 |
|
|
23 |
#import <FBSDKShareKit/FBSDKShareOpenGraphValueContainer.h> |
|
24 |
|
e81c27
|
25 |
NS_ASSUME_NONNULL_BEGIN |
H |
26 |
|
9febd9
|
27 |
/** |
W |
28 |
An Open Graph Object for sharing. |
|
29 |
|
|
30 |
The property keys MUST have namespaces specified on them, such as `og:image`, |
bad748
|
31 |
and `og:type` is required. |
W |
32 |
|
|
33 |
See https://developers.facebook.com/docs/sharing/opengraph/object-properties for other properties. |
|
34 |
|
|
35 |
You can specify nested namespaces inline to define complex properties. For example, the following |
|
36 |
code will generate a fitness.course object with a location: |
|
37 |
|
|
38 |
FBSDKShareOpenGraphObject *course = [FBSDKShareOpenGraphObject objectWithProperties: |
|
39 |
@{ |
|
40 |
@"og:type": @"fitness.course", |
|
41 |
@"og:title": @"Sample course", |
|
42 |
@"fitness:metrics:location:latitude": @"41.40338", |
|
43 |
@"fitness:metrics:location:longitude": @"2.17403", |
|
44 |
}]; |
|
45 |
*/ |
e81c27
|
46 |
NS_SWIFT_NAME(ShareOpenGraphObject) |
bad748
|
47 |
@interface FBSDKShareOpenGraphObject : FBSDKShareOpenGraphValueContainer <FBSDKCopying, NSSecureCoding> |
W |
48 |
|
9febd9
|
49 |
/** |
W |
50 |
Convenience method to build a new action and set the object for the specified key. |
13e53a
|
51 |
@param properties Properties for the Open Graph object, which will be parsed into the proper models |
bad748
|
52 |
*/ |
e81c27
|
53 |
+ (instancetype)objectWithProperties:(NSDictionary<NSString *, id> *)properties; |
bad748
|
54 |
|
9febd9
|
55 |
/** |
W |
56 |
Compares the receiver to another Open Graph Object. |
13e53a
|
57 |
@param object The other object |
H |
58 |
@return YES if the receiver's values are equal to the other object's values; otherwise NO |
bad748
|
59 |
*/ |
W |
60 |
- (BOOL)isEqualToShareOpenGraphObject:(FBSDKShareOpenGraphObject *)object; |
|
61 |
|
|
62 |
@end |
e81c27
|
63 |
|
H |
64 |
NS_ASSUME_NONNULL_END |