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 |
|
|
25 |
/*! |
|
26 |
@abstract An Open Graph Object for sharing. |
|
27 |
@discussion The property keys MUST have namespaces specified on them, such as `og:image`, |
|
28 |
and `og:type` is required. |
|
29 |
|
|
30 |
See https://developers.facebook.com/docs/sharing/opengraph/object-properties for other properties. |
|
31 |
|
|
32 |
You can specify nested namespaces inline to define complex properties. For example, the following |
|
33 |
code will generate a fitness.course object with a location: |
|
34 |
|
|
35 |
FBSDKShareOpenGraphObject *course = [FBSDKShareOpenGraphObject objectWithProperties: |
|
36 |
@{ |
|
37 |
@"og:type": @"fitness.course", |
|
38 |
@"og:title": @"Sample course", |
|
39 |
@"fitness:metrics:location:latitude": @"41.40338", |
|
40 |
@"fitness:metrics:location:longitude": @"2.17403", |
|
41 |
}]; |
|
42 |
*/ |
|
43 |
@interface FBSDKShareOpenGraphObject : FBSDKShareOpenGraphValueContainer <FBSDKCopying, NSSecureCoding> |
|
44 |
|
|
45 |
/*! |
|
46 |
@abstract Convenience method to build a new action and set the object for the specified key. |
|
47 |
@param properties Properties for the Open Graph object, which will be parsed into the proper models |
|
48 |
*/ |
|
49 |
+ (instancetype)objectWithProperties:(NSDictionary *)properties; |
|
50 |
|
|
51 |
/*! |
|
52 |
@abstract Compares the receiver to another Open Graph Object. |
|
53 |
@param object The other object |
|
54 |
@return YES if the receiver's values are equal to the other object's values; otherwise NO |
|
55 |
*/ |
|
56 |
- (BOOL)isEqualToShareOpenGraphObject:(FBSDKShareOpenGraphObject *)object; |
|
57 |
|
|
58 |
@end |