# 上傳GIF供FB預覽 使用 GIPHY developers 上傳 gif ,拿到的網址可轉址到活動網址 #### 限制:一定會先轉址到 GLPHY 頁面 、 手機板操作困難度過高 ## 登入 GIPHY developers 、 創建 APP > 網址: https://developers.giphy.com/ 用 rdartgital FB 帳號登入即可 開啟 dashboard  新增 App (我選擇 API )  填寫名字和描述 ( 隨意 )  拿到 API 的 Key  ## 呼叫 API > API 文件: https://developers.giphy.com/docs/api#quick-start-guide ``` //javascript, jQuery var xhr = $.post("http://upload.giphy.com/v1/gifs", { api_key: "YOUR_API_KEY", // required username: "rdartgital", source_image_url: "YOUR_IMAGE_URL", source_post_url:"YOUR_SITE_URL", tags: "te,test2,test3" // ,file:'' // string(binary) }); xhr.done(function(data) { console.log("success got data", data); }); ``` ``` //javascript, jQuery var xhr = $.get("https://api.giphy.com/v1/gifs/YOUR_OBGECT_ID?api_key=YOUR_API_KEY"); xhr.done(function(data) { console.log("success got data", data); }); ``` 回傳的 bitly_url 即 gif 網址
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up