I have an macro code to upload post from excel to FB page. However, the code only grabbed a partial content of the URL link of the image and post it to facebook page. How could I change the code to grab all the content of the URL link of an image to post to facebook. Below is the code I'm using.
Option Explicit
Sub PostToSM()
Dim objHTTP As Object
Dim TNguyen, URL, Title, Desc, VidLink As String
Dim PostLink As String
Dim DateTime As Date
Dim SelRow As Long
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
With Sheet1
SelRow = .Range("B1").Value 'Selected Row
Title = .Range("E" & SelRow).Value 'Post Title
Desc = .Range("F" & SelRow).Value 'Post Description
PostLink = .Range("G" & SelRow).Value 'Picture Link
VidLink = .Range("H" & SelRow).Value 'Video Link
If .Range("K" & SelRow).Value = "ü" Then 'Run on Facebook Selected
URL = "https://hooks.zapier.com/hooks/catch/3811323/lutrx5/?Post_Title=" & Title & "&PostDesc=" & Desc & "&PostLink=" & PostLink 'Facebook Post Webhook
objHTTP.Open "PATCH", URL, False
objHTTP.setRequestHeader "Content-type", "application/json"
objHTTP.send (TNguyen) 'Send Information
End If
.Range("J" & SelRow).Value = Now 'Add Posted Date & Time
End With
End Sub
This is the URL link that I refer from a cell content:
https://images.nike.com/is/image/DotCom/pwp_sheet2?$NIKE_PWPx3$&$img0=580603_603&$img1=580603_001&$img2=580603_300
As I checked on my facebook page. It only returned a partial content of the link above as it is shown below:
https://images.nike.com/is/image/DotCom/pwp_sheet2?$NIKE_PWPx3$
How could we get a whole content? is it a limit that excel could only grab in the content?
Bookmarks