Skip to content
shu223 edited this page Nov 6, 2013 · 6 revisions

###Invite

####Q: Is it possible to add a picture (from the device) to the inviation? We would really like to be able to show a visual with the invitation text in the invitee's Facebook Wall.

A: You can add pictures into the generated landing pages by passing inviteInfo as below:

NSDictionary *inviteInfo = @{kDataPropertyContentURL: [UIImage imageNamed:@"filename"]};

[ASInviter inviteVia:ASInviteTypeFacebookMessage
          inviteInfo:inviteInfo
          completion:nil];

And add {{content_url}} into the place where you'd like to display in your page template from our dashboard.

See also: Display customized data on landing pages

####Q: How can I make an ASFriend object for Twitter manually? A: You can use initWithDetail:type: and put the NSDictionary object which is retrieved from Twitter API (e.g. friends/ids.json) for the "detail" argument.

ASFriend *friend = [[ASFriend alloc] initWithDetail:dictionaryFromTwitterAPI
                                               type:ASFriendTypeTwitter];

###Share

####Q: How can I change the default message in the SHARE composer?

A: The share related functions in ASSharer have "shareInfo" properties or arguments. You can pass a string value for a kDataPropertyMessage key, and it become the default (preset) message in the share composer.

NSDictionary *shareInfo = @{kDataPropertyMessage: @"This is preset message"};

ShareSample is useful for the reference.