tonickkozlov / vue-tweet-embed

Embed tweets in your vue.js app
111 stars 27 forks source link

List support for timeline component #24

Closed aevaldas closed 5 years ago

aevaldas commented 5 years ago

Hi, @tonickkozlov

Added list support for timeline component.

Twitter doc: https://developer.twitter.com/en/docs/twitter-for-websites/timelines/guides/list-timeline

aevaldas commented 5 years ago

@tonickkozlov

tonickkozlov commented 5 years ago

Hi @aevaldas ,

Thanks a lot for your contribution!

Does the Timeline component work for you though? I get the following error:

Uncaught (in promise) Embedded timelines with widget settings have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295.

Here's the linked documentation https://developer.twitter.com/en/docs/twitter-for-websites/timelines/guides/profile-timeline

To me it looks like

    embedComponent (twttr, ...args) {
        return twttr.widgets.createTimeline(...args)
    },

gives too many arguments for twttr.widgets.createTimeline function.

Do you think it should look like below?

    embedComponent (twttr, params, element) {
        return twttr.widgets.createTimeline(params, element)
    }

Please take a look. Thanks!

aevaldas commented 5 years ago

Hi @tonickkozlov ,

Thanks for your review!

Yes, Timeline component is working perfectly for me.

According to the announcement (https://twittercommunity.com/t/deprecating-widget-settings/102295), Twitter no longer supports widget settings on account: https://twitter.com/settings/widgets What means, that our components are not related in that.

By that way: embedComponent (twttr, ...args) { return twttr.widgets.createTimeline(...args) },

We would ignore this.options at src/core/index.js:53: .then(twttr => me.embedComponent(twttr, params, this.$el, this.options))

What isn't a good idea.

Could you tell me how to replicate that error: Uncaught (in promise) Embedded timelines with widget settings have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295. ?

aevaldas commented 5 years ago

@tonickkozlov let's push it. I couldn't reproduce that error.