FBSDKShareOpenGraphObject Class Reference
Inherits from | FBSDKShareOpenGraphValueContainer : NSObject |
Conforms to | FBSDKCopying NSSecureCoding |
Declared in | FBSDKShareOpenGraphObject.h |
Overview
The property keys MUST have namespaces specified on them, such as og:image
,
and og:type
is required.
See https://developers.facebook.com/docs/sharing/opengraph/object-properties for other properties.
You can specify nested namespaces inline to define complex properties. For example, the following code will generate a fitness.course object with a location:
FBSDKShareOpenGraphObject *course = [FBSDKShareOpenGraphObject objectWithProperties: @{ @“og:type”: @“fitness.course”, @“og:title”: @“Sample course”, @“fitness:metrics:location:latitude”: @“41.40338”, @“fitness:metrics:location:longitude”: @“2.17403”, }];
Class Methods
objectWithProperties:
Convenience method to build a new action and set the object for the specified key.
+ (instancetype)objectWithProperties:(NSDictionary *)properties
Parameters
- properties
Properties for the Open Graph object, which will be parsed into the proper models
Declared In
FBSDKShareOpenGraphObject.h
Instance Methods
isEqualToShareOpenGraphObject:
Compares the receiver to another Open Graph Object.
- (BOOL)isEqualToShareOpenGraphObject:(FBSDKShareOpenGraphObject *)object
Parameters
- object
The other object
Return Value
YES if the receiver’s values are equal to the other object’s values; otherwise NO
Declared In
FBSDKShareOpenGraphObject.h