VNG-Zalo / zalosdk-kotlin

0 stars 1 forks source link

[Interact with the app Zalo] What kind of data does Zalo Android support? #2

Open hiepxuan2008 opened 4 years ago

hiepxuan2008 commented 4 years ago

Hi Zalo team, thanks for your demo application. I'm working for a company, that our product wants to interact with Zalo application. I'm caring about Interact with the app Zalo section (Message Type & Feed Type). Reference: https://developers.zalo.me/docs/sdk/android-sdk/tuong-tac-voi-app-zalo/dang-bai-viet-post-447 I wonder what kind of data does Zalo Android support for other apps to interact with?

  1. I run your demo application, in FeedData object, you set

    private fun mockFeedData(): FeedData {
        val feed = FeedData()
        feed.msg = "Prefill message"
        feed.link = "https://news.zing.vn"
        feed.linkTitle = "Zing News"
        feed.linkSource = "https://news.zing.vn"
        feed.linkThumb =
            listOf("https://img.v3.news.zdn.vn/w660/Uploaded/xpcwvovb/2015_12_15/cua_kinh_2.jpg")
        return feed
    }

    and do zaloOpenApi.shareMessage(mockFeedData(), this) or zaloOpenApi.shareFeed(mockFeedData(), this) But it only works with feed.link, other fields don't work, can you help to recheck?

  2. What kind of data does Zalo support? FOR MESSAGE type:

FOR FEED type:

I'm looking forward to hearing from you as soon as possible. Thanks & Best regards

siduytruong-us commented 4 years ago

We have update params of 2 method shareMessage, shareFeed and deprecated 2 old methods

From Old =>

shareFeed(final Context context, final FeedData feedOb, final ZaloPluginCallback callback)
shareMessage(final Context context, final FeedData feedOb, final ZaloPluginCallback callback)

To New =>

void shareMessage( String message, @Nullable ZaloPluginCallback callback)
void shareFeed( String link, @Nullable ZaloPluginCallback callback)
  1. For shareMessage type:
  1. For shareFeed type: just accept LINK only (no text), you can add text in Zalo App PreparePost screen
  2. For sendMessageToFriend, postToWall in OpenApi:

We have updated UI for DEMO in branch release/v2.5.0421, check it for more example.