OneAllAPI api = OneAllAPI.NewInstance(
new Uri(@"mysiteurl"), @"myprivatekey", @"mypublickey", new DisplaySettings() { SameWindow = true }, new DisplaySettings() { SameWindow = true }, new List<string>() { "reddit" }, new List<Provider>() { new Provider() { Name = "reddit" } });
api.Settings.Domain = new Uri("mysiteurl");
UserSharingRequest req = new UserSharingRequest();
SharingUser u = new SharingUser();
u.UserToken = new Guid("myreddituserid");//reddit id retreived from /users.json
u.Providers.Add("reddit");
req.PublishForUser = u;
req.Parts = new SharingMessageParts()
{
//Link=new MessageLink(){ Name="Google", Url=new Uri("http://www.google.com")},
//Picture = new MessagePicture() { Url = new Uri("http://www.xpglive.com/favicon.ico") },
//Video = new MessageVideo() { Url = new Uri("http://www.xpglive.com/") },
Text = new MessageText() { Body = "A Sharing API post" },
Indicator = new TrackingIndicator() { EnableTracking = true }
};
Response<SharingResult> response = api.SharingPublishMessage(req);
Please sign in to your OneAll account to ask a new question or to contribute to the discussions.
Please click on the link below to connect to the forum with your OneAll account.
Answers