Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá, alguém já teria um exemplo de como utilizar o Asp junto com o Flickr?
Já olhei lá e não achei nada com referência para usar com o Classic Asp.
<%
'place in body of page
'replace XXXXXXXX with YOUR API key
'replace YYYYYYYY with the photoset ID
%>
<%
getphotosetlist "http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=XXXXXXXX&photoset_id=YYYYYYYY"
%>
--------------------------------------------------
<%
'Place in include file or after </html> tag
%>
<%
Sub getphotosetlist(xmlFile)
Dim objXML, objRoot, objItems, c
c = 0
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.Async = False
objXML.SetProperty "ServerHTTPRequest", True
objXML.ResolveExternals = True
objXML.ValidateOnParse = True
objXML.Load(xmlFile)
If (objXML.parseError.errorCode = 0) Then
Set objRoot = objXML.documentElement
If IsObject(objRoot) = False Then
response.Write "<h2>No Root Found in XML/Rss File </h2>"
End If
'code to start & end table rows
tbRow="<tr>"
tbrowend="</tr>"If IsObject(objItems) = True Then
Dim objItem, objitemx
'Get the userID
for each objitemx in objitemsx
StrUserID = objItemx.attributes(2).value
next
For Each objItem in objItems
if cellcount=0 then
response.write tbrow
end if
StrPhotoID = objItem.attributes(0).value
On Error Resume Next
StrSecret = objItem.attributes(1).value
On Error Resume Next
StrServer = objItem.attributes(2).value
On Error Resume Next
StrFarm = objItem.attributes(3).value
On Error Resume Next
Strtitle = objItem.attributes(4).value
On Error Resume Next
%>
<td align="center">
<%'build the image URL here see flickr documentation for deails of which size image to display - _t.jpg = thumbnails%>
<a href="http://www.flickr.com/photos///" target="_blank" border="0"><img src="http://farm.static.flickr.com//__t.jpg">
[Fonte e demonstração
Obrigado, testei aqui e deu certo....
Vlw
Que bom que lhe ajudou. http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif
utilize a própria API do Flickr, link