public static void Publish(VKPublishInputData data) { if (data == null) { throw new ArgumentNullException("data"); } VKParametersRepository.SetParameterForId(VKPublishPage.INPUT_PARAM_ID, data); RootFrame.Navigate(new Uri(string.Format("/VK.WindowsPhone.SDK;component/Pages/VKPublishPage.xaml"), UriKind.Relative)); }
public void wall_post(string par) { string[] options = JsonHelper.Deserialize <string[]>(par); VKPublishInputData data = new VKPublishInputData(); try { JObject p = JObject.Parse(options[0]); var dict = p.ToObject <Dictionary <string, string> >(); data.Text = dict["message"]; // TODO links and images } catch (Exception e) { data.Text = options[0]; } DispatchInvoke(() => { VKSDK.Publish(data); }); }
private void Publish_Click(object sender, RoutedEventArgs e) { var rs = Application.GetResourceStream(new Uri("TestImage.jpg", UriKind.Relative)); Stream imageStream = rs.Stream; var inputData = new VKPublishInputData { Text = "В Доме Зингера", Image = imageStream, ExternalLink = new VKPublishInputData.VKLink { Title = "VK", Subtitle = "VKontakte", Uri = "http://VK.com" } }; VKSDK.Publish(inputData); }