привет
I'm from Germany and have to create my first VKontakte App. Most things work fine.
I want to share content, I found the api method wall.post.
Most apps post an image with a preview flash on the wall. How is this possible? How can I create Deeplinks back to my app?
спасибо
Sebastian
PS: You can answer in Russian, if your English is not good enough.
Share content on VKontakte
Re: Share content on VKontakte
swe, Hi) The forum is a lesson on wall.post http://flapps.ru/forum/topic3180.html
To create a link to the application, just to check if the application is open from the wall, then display a window with a button that when clicked, will move to the Annex))
To create a link to the application, just to check if the application is open from the wall, then display a window with a button that when clicked, will move to the Annex))
Re: Share content on VKontakte
Hi,
it works. I tried without an image.
What is the best way:
-I always upload a picture before every post?
-I upload a picture to my own album and use this for every wallpost?
it works. I tried without an image.
What is the best way:
-I always upload a picture before every post?
-I upload a picture to my own album and use this for every wallpost?
Re: Share content on VKontakte
swe писал(а): I tried without an image.
Код: Выделить всё
import flash.display.*; import flash.events.*; var viewer_id; var wrapper:Object; function Main():void { this.addEventListener( Event.ADDED_TO_STAGE, onAddedToStage ); } function onAddedToStage(e: Event):void { wrapper=Object(parent.parent); // если приложение открыто со стены if (wrapper.application.parameters.referrer=='wall_view_inline'||wrapper.application.parameters.referrer=='wall_view') { result_tf.text='Здесь вы можете считать post_id и загрузить большое изображение.\n' + 'post_id=' + wrapper.application.parameters.post_id; // post_id передаётся в запросе ниже } send_btn.addEventListener(MouseEvent.CLICK, send_btnClick); viewer_id=wrapper.application.parameters.viewer_id; } function send_btnClick(e: MouseEvent):void { // отправляем запрос ('стена пользователяь которому будет отправлено фото (id)', 'photo_id', 'Сообщение') var to_id=viewer_id; // id пользователя, на стену которого будет отправляться фото var post_id='post1';// id записи. Этот параметр будет передаваться в приложение через flashVars при просмотре записи на стене пользователя var post_message='ТЕКСТТЕКСТ '; wrapper.external.api('wall.post', {message:post_message}, photoPosted, onError); } function photoPosted(data: Object):void { // сохраняем запись на стене пользователя wrapper.external.callMethod('saveWallPost', data.post_hash); // пользователь нажал Добавить запись или Отмена wrapper.addEventListener("onWallPostSave", onWallPostSave); wrapper.addEventListener("onWallPostCancel", onWallPostCancel); } // пользователь подтвердил публикацию записи на стене function onWallPostSave(e: Object): void { result_tf.text='Запись добавлена'; } // пользователь отменил публикацию записи на стену function onWallPostCancel(e: Object): void { result_tf.text='Вы нажали Отмена'; } // ошибка при обращении к серверу api function onError(data: Object):void { result_tf.text = data.error_msg; }Main()
Best way is second.swe писал(а): What is the best way:
-I always upload a picture before every post?
-I upload a picture to my own album and use this for every wallpost?
How to upload a photo to your album?
Re: Share content on VKontakte
swe писал(а): Most apps post an image with a preview flash on the wall. How is this possible? How can I create Deeplinks back to my app?
Код: Выделить всё
// если приложение открыто со стены// if app open from wall if (wrapper.application.parameters.referrer=='wall_view_inline'||wrapper.application.parameters.referrer=='wall_view') {//to do something//can be taken at the scene image or button }
I guess I do not understand that you can not and try to help so than is not necessary
Sorry for my bad english