新浪微博开发平台地址 http://open.weibo.com/

2024-06-13 17:48

本文主要是介绍新浪微博开发平台地址 http://open.weibo.com/,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

新浪微博开发平台地址 http://open.weibo.com/

-----

新浪微博:

1、各网站、论坛、博客等通用代码: <a href=”javascript:(function(){window.open(‘http://v.t.sina.com.cn/share/share.php?title=’+encodeURIComponent(document.title)+’&url=’+encodeURIComponent(location.href)+’&source=bookmark’,'_blank’,'width=450,height=400′);})()” title=”新浪微博分享”><img src=”http://t.sina.com.cn/favicon.ico”  alt=”新浪微博分享” border=”0〃>分享到新浪微博</a>

   此代码无需申请 Appkey

2、新浪官方分享到代码:

<a href=”javascript:void((function(s,d,e,r,l,p,t,z,c) {var f=’http://v.t.sina.com.cn/share/share.php?appkey=真实的 appkey’,u=z||d.location,p=['&url=',e(u),'& title=',e(t||d.title),'&source=',e(r),'&sourceUrl=',e(l),'& content=',c||'gb2312','&pic=',e(p||'')].join(”);function a() {if(!window.open([f,p].join(”),’mb’, ['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width- 440)/2,',top=',(s.height-430)/2].join(”)))u.href=[f,p].join(”);}; if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();}) (screen,document,encodeURIComponent,”,”,’图片链接|默认为空’,'标题|默认当前页标题’,'内容链接|默认当前页location’,'页面编码gb2312|utf-8默认gb2312′));”>分享至微博</a>


    注意事项说明:?
    此需要申请appkey帐号,地址:open.t.sina.com.cn
    真实的appkey {string} 必选参数?
    图片链接 (String) 可选参数, 默认为空?
    标题 (String) 可选参数, 默认当前页title?
    内容链接 (String) 可选参数, 默认当前页location?
    页面编码 (String) 可选参数, [gb2312|utf-8] 默认gb2312?
    <a> 的链接样式及文字可自行据需求修改.代码中有 ” f ” 属正常代码,无需处理

    3、非官方正式代码:

    1)、<a href=”http://v.t.sina.com.cn/share/share.php?title=你好 hello world” target=”_blank”>分享到微博</a>,简单分享(无需申请)

    2)、<a href=”http://v.t.sina.com.cn/share/share.php?appkey=4120396272&title=你好 hello world” target=”_blank”>分享到微博</a>,带有AppKey(Appkey需要前往 open.t.sina.com.cn 申请)

    字段需要经过encodeURIComponent,例子:
你好 http://t.sina.com.cn/ -&gt <script>document.write(encodeURIComponent(“你好 http://t.sina.com.cn/”));</script>
 
 
    注:Appkey需要前往 open.t.sina.com.cn 申请


开心网:

document.writeln("<a href="javascript:window.open(\'http:\/\/www.kaixin001.com\/repaste\/share.php?rtitle=\'+encodeURIComponent(document.title.substring(0,76))+\'&rurl=\'+encodeURIComponent(location.href)+\'&rcontent=\',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\'); void 0" style="color:#000000;text-decoration:none;font-size:12px;font-weight:normal"><SPAN style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 10px; CURSOR: pointer; PADDING-TOP: 5px"><IMG alt=转帖到开心网 src="http:\/\/img1.kaixin001.com.cn\/i\/favicon.ico" align=absMiddle border=0>&nbsp;转帖到开心网<\/SPAN><\/a>");

人人网:

document.writeln("<a href="javascript:window.open(\'http://share.renren.com/share/buttonshare.do?title=\'+encodeURIComponent(document.title.substring(0,76))+\'&link=\'+encodeURIComponent(location.href)+\'&content=\',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\'); void 0" style="color:#000000;text-decoration:none;font-size:12px;font-weight:normal"><SPAN style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 10px; CURSOR: pointer; PADDING-TOP: 5px"><IMG alt=转帖到人人网 src="http:\/\/s.xnimg.cn\/favicon-rr.ico" align=absMiddle border=0>&nbsp;转帖到人人网<\/SPAN><\/a><\/div>");

网易微博分享代码

1、样式一:任何网站、博客都可以调用

<a href=”javascript:(function(){window.open(‘http://t.163.com/article/user /checkLogin.do?link=http://news.163.com/&source=’+'土豆网’+ ‘&info=’+encodeURIComponent(document.title)+’ ‘+encodeURIComponent(location.href),’_blank’,'width=510,height=300′);})()” title=”分享到网易微博”><img src=”http://www.taoba123.com/images/resource_10544871274700952v.png” alt=”网易微博分享” border=”0〃></a>

<a href=”javascript:(function(){window.open(‘http://t.163.com/article/user /checkLogin.do?link=http://news.163.com/&source=’+'土豆网’+ ‘&info=’+encodeURIComponent(document.title)+’ ‘+encodeURIComponent(location.href),’_blank’,'width=510,height=300′);})()” title=”分享到网易微博”><img src=”http://www.taoba123.com/images/resource_10544871274700952v.png” alt=”网易微博分享” border=”0〃></a>


2、样式二

<a target=”_self” οnclick=”(function(){var url = ‘link=http://news.163.com/&amp;source=’+ encodeURIComponent(‘网易新闻’)+ ‘&amp;info=’+ encodeURIComponent(document.title) + ‘ ‘ + encodeURIComponent(document.location.href);window.open(‘http://t.163.com/article/user/checkLogin.do?’+url+’&amp;’+new Date().getTime(),’newwindow’,'height=330,width=550,top=’+(screen.height-280)/2+’,left=’+(screen.width-550)/2+’, toolbar=no, menubar=no, scrollbars=no,resizable=yes,location=no, status=no’);})()” href=”javascript:void(0);”><img height=”19px” border=”0〃 align=”absMiddle” src=”http://img1.cache.netease.com/cnews/css09/wblog.gif” alt=”分享到网易微博” title=”分享到网易微博” />分享到网易微博</a>


<a target=”_self” οnclick=”(function(){var url = ‘link=http://news.163.com/&amp;source=’+ encodeURIComponent(‘网易新闻’)+ ‘&amp;info=’+ encodeURIComponent(document.title) + ‘ ‘ + encodeURIComponent(document.location.href);window.open(‘http://t.163.com/article/user/checkLogin.do?’+url+’&amp;’+new Date().getTime(),’newwindow’,'height=330,width=550,top=’+(screen.height-280)/2+’,left=’+(screen.width-550)/2+’, toolbar=no, menubar=no, scrollbars=no,resizable=yes,location=no, status=no’);})()” href=”javascript:void(0);”><img height=”19px” border=”0〃 align=”absMiddle” src=”http://img1.cache.netease.com/cnews/css09/wblog.gif” alt=”分享到网易微博” title=”分享到网易微博” />分享到网易微博</a>

搜狐微博分享代码

javascript:void(((function(s,d,e){var f='http://t.sohu.com/third/post.jsp?&url='+e(location.href)+'&title='+e(d.title),u=d.location;function a(){if(!window.open(f,'sohushare',['toolbar=0,status=0,resizable=1,width=660,height=470,left=',(s.width-660)/2,',top=',(s.height-470)/2].join('')))u.href=f;};if(-[1,])setTimeout(a,0);else a();})(screen,document,escape)))

这篇关于新浪微博开发平台地址 http://open.weibo.com/的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1057999

相关文章

Python中使用正则表达式精准匹配IP地址的案例

《Python中使用正则表达式精准匹配IP地址的案例》Python的正则表达式(re模块)是完成这个任务的利器,但你知道怎么写才能准确匹配各种合法的IP地址吗,今天我们就来详细探讨这个问题,感兴趣的朋... 目录为什么需要IP正则表达式?IP地址的基本结构基础正则表达式写法精确匹配0-255的数字验证IP地

Spring Shell 命令行实现交互式Shell应用开发

《SpringShell命令行实现交互式Shell应用开发》本文主要介绍了SpringShell命令行实现交互式Shell应用开发,能够帮助开发者快速构建功能丰富的命令行应用程序,具有一定的参考价... 目录引言一、Spring Shell概述二、创建命令类三、命令参数处理四、命令分组与帮助系统五、自定义S

在Android平台上实现消息推送功能

《在Android平台上实现消息推送功能》随着移动互联网应用的飞速发展,消息推送已成为移动应用中不可或缺的功能,在Android平台上,实现消息推送涉及到服务端的消息发送、客户端的消息接收、通知渠道(... 目录一、项目概述二、相关知识介绍2.1 消息推送的基本原理2.2 Firebase Cloud Me

Python通过模块化开发优化代码的技巧分享

《Python通过模块化开发优化代码的技巧分享》模块化开发就是把代码拆成一个个“零件”,该封装封装,该拆分拆分,下面小编就来和大家简单聊聊python如何用模块化开发进行代码优化吧... 目录什么是模块化开发如何拆分代码改进版:拆分成模块让模块更强大:使用 __init__.py你一定会遇到的问题模www.

Nginx中配置HTTP/2协议的详细指南

《Nginx中配置HTTP/2协议的详细指南》HTTP/2是HTTP协议的下一代版本,旨在提高性能、减少延迟并优化现代网络环境中的通信效率,本文将为大家介绍Nginx配置HTTP/2协议想详细步骤,需... 目录一、HTTP/2 协议概述1.HTTP/22. HTTP/2 的核心特性3. HTTP/2 的优

Spring Security基于数据库的ABAC属性权限模型实战开发教程

《SpringSecurity基于数据库的ABAC属性权限模型实战开发教程》:本文主要介绍SpringSecurity基于数据库的ABAC属性权限模型实战开发教程,本文给大家介绍的非常详细,对大... 目录1. 前言2. 权限决策依据RBACABAC综合对比3. 数据库表结构说明4. 实战开始5. MyBA

使用Python自建轻量级的HTTP调试工具

《使用Python自建轻量级的HTTP调试工具》这篇文章主要为大家详细介绍了如何使用Python自建一个轻量级的HTTP调试工具,文中的示例代码讲解详细,感兴趣的小伙伴可以参考一下... 目录一、为什么需要自建工具二、核心功能设计三、技术选型四、分步实现五、进阶优化技巧六、使用示例七、性能对比八、扩展方向建

使用Python开发一个简单的本地图片服务器

《使用Python开发一个简单的本地图片服务器》本文介绍了如何结合wxPython构建的图形用户界面GUI和Python内建的Web服务器功能,在本地网络中搭建一个私人的,即开即用的网页相册,文中的示... 目录项目目标核心技术栈代码深度解析完整代码工作流程主要功能与优势潜在改进与思考运行结果总结你是否曾经

使用Python实现快速搭建本地HTTP服务器

《使用Python实现快速搭建本地HTTP服务器》:本文主要介绍如何使用Python快速搭建本地HTTP服务器,轻松实现一键HTTP文件共享,同时结合二维码技术,让访问更简单,感兴趣的小伙伴可以了... 目录1. 概述2. 快速搭建 HTTP 文件共享服务2.1 核心思路2.2 代码实现2.3 代码解读3.

Spring Boot + MyBatis Plus 高效开发实战从入门到进阶优化(推荐)

《SpringBoot+MyBatisPlus高效开发实战从入门到进阶优化(推荐)》本文将详细介绍SpringBoot+MyBatisPlus的完整开发流程,并深入剖析分页查询、批量操作、动... 目录Spring Boot + MyBATis Plus 高效开发实战:从入门到进阶优化1. MyBatis