このページのトップへ
ツイッターとの統合

ツイッターとの統合

twitter-integration Veloパッケージを使ってツイートし、最新のツイートを取得する。

中級.png

初心者

1K

出版された:

March 9, 2021

酒を楽しむ少女

によって

アンカー 1
開発者を雇う

説明例

In this example, we use the Twitter Integration Velo package to post and get tweets from a Wix site. You can tweet a timestamp to the VeloExamples Twitter account and get the latest tweets from any Twitter account.


For more information about this Velo Package, please see the Readme in the package folder located in the Code Files section of your site.

コード例

タブ1

.

タブ2

.

タブ3

.

このコードによる解決は複雑になる可能性がある。

どのように構築したか

We installed the Velo package on our site, and followed the steps described in the Setup section of the package’s readme file.  

 

ページ要素


In our site we added the following elements:


  • Loader GIF: runs when getting or sending a tweet. 


Generate a Tweet


  • 2 buttons: one for generating the current timestamp and tweeting it, and one hidden button that is shown after tweeting and links to Twitter.

  • Text element: to display a success message.
     

Get Latest Tweet


  • Text input: for entering a Twitter account name to get the latest tweet.

  • Text box: (read-only mode) for displaying the content of the tweet.

  • Button: to get the latest tweet. 

 


Backend code


We used a web module named twitter-wrapper.jsw to wrap the package functions and use them in our page code. In the web module, we imported the tweet() and getLatestTweet() functions from the package. The web module contains 2 functions: 

 

  • tweetWrapper(): Gets the content of the tweet (the timestamp, in our example) and calls the package’s tweet() function with the content.

 

  • getLatestTweetWrapper(accountNameInput): Calls the package’s getLatestTweet() function with the provided account name or if no account is specified, with our default Twitter account: @VeloExamples.

 

ページコード


We imported the wrapper functions from the web module. Then we added onClick event handlers to the 2 buttons. When a site visitor clicks a button, the corresponding backend function is called, either generating or getting a tweet. 

使用したAPI

コード以外の例。

コード以外の例。

コード以外の例。

関連記事

開発者を雇う

Veloソリューションは強力なツールですが、自力で構築するのは困難です。経験豊富なVelo開発会社に構築をお任せください。

関連例

これは役に立ったか?

はい

|

いいえ

ご意見ありがとう!

セールスフォースとの統合

セールスフォースとの統合

セールスフォース統合パッケージVeloを使用して、Salesforceのアカウントデータレコードを管理する。

中級.png

中級

Google シーツの統合

Google シーツの統合

Google-sheets-integration Veloパッケージを使用して、Google シートで電話帳データを管理する。

中級.png

中級

SendGrid npm Integration

SendGrid npm Integration

Use SendGrid’s npm module to send emails from your site

中級.png

中級

アンカー2
ページ下