新浪微博开发平台地址 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

相关文章

PyQt5 GUI 开发的基础知识

《PyQt5GUI开发的基础知识》Qt是一个跨平台的C++图形用户界面开发框架,支持GUI和非GUI程序开发,本文介绍了使用PyQt5进行界面开发的基础知识,包括创建简单窗口、常用控件、窗口属性设... 目录简介第一个PyQt程序最常用的三个功能模块控件QPushButton(按钮)控件QLable(纯文本

Linux之platform平台设备驱动详解

《Linux之platform平台设备驱动详解》Linux设备驱动模型中,Platform总线作为虚拟总线统一管理无物理总线依赖的嵌入式设备,通过platform_driver和platform_de... 目录platform驱动注册platform设备注册设备树Platform驱动和设备的关系总结在 l

基于Python开发一个图像水印批量添加工具

《基于Python开发一个图像水印批量添加工具》在当今数字化内容爆炸式增长的时代,图像版权保护已成为创作者和企业的核心需求,本方案将详细介绍一个基于PythonPIL库的工业级图像水印解决方案,有需要... 目录一、系统架构设计1.1 整体处理流程1.2 类结构设计(扩展版本)二、核心算法深入解析2.1 自

springboot如何通过http动态操作xxl-job任务

《springboot如何通过http动态操作xxl-job任务》:本文主要介绍springboot如何通过http动态操作xxl-job任务的问题,具有很好的参考价值,希望对大家有所帮助,如有错... 目录springboot通过http动态操作xxl-job任务一、maven依赖二、配置文件三、xxl-

SpringBoot开发中十大常见陷阱深度解析与避坑指南

《SpringBoot开发中十大常见陷阱深度解析与避坑指南》在SpringBoot的开发过程中,即使是经验丰富的开发者也难免会遇到各种棘手的问题,本文将针对SpringBoot开发中十大常见的“坑... 目录引言一、配置总出错?是不是同时用了.properties和.yml?二、换个位置配置就失效?搞清楚加

Python中对FFmpeg封装开发库FFmpy详解

《Python中对FFmpeg封装开发库FFmpy详解》:本文主要介绍Python中对FFmpeg封装开发库FFmpy,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录一、FFmpy简介与安装1.1 FFmpy概述1.2 安装方法二、FFmpy核心类与方法2.1 FF

基于Python开发Windows屏幕控制工具

《基于Python开发Windows屏幕控制工具》在数字化办公时代,屏幕管理已成为提升工作效率和保护眼睛健康的重要环节,本文将分享一个基于Python和PySide6开发的Windows屏幕控制工具,... 目录概述功能亮点界面展示实现步骤详解1. 环境准备2. 亮度控制模块3. 息屏功能实现4. 息屏时间

Python实例题之pygame开发打飞机游戏实例代码

《Python实例题之pygame开发打飞机游戏实例代码》对于python的学习者,能够写出一个飞机大战的程序代码,是不是感觉到非常的开心,:本文主要介绍Python实例题之pygame开发打飞机... 目录题目pygame-aircraft-game使用 Pygame 开发的打飞机游戏脚本代码解释初始化部

使用Python开发一个现代化屏幕取色器

《使用Python开发一个现代化屏幕取色器》在UI设计、网页开发等场景中,颜色拾取是高频需求,:本文主要介绍如何使用Python开发一个现代化屏幕取色器,有需要的小伙伴可以参考一下... 目录一、项目概述二、核心功能解析2.1 实时颜色追踪2.2 智能颜色显示三、效果展示四、实现步骤详解4.1 环境配置4.

Maven 配置中的 <mirror>绕过 HTTP 阻断机制的方法

《Maven配置中的<mirror>绕过HTTP阻断机制的方法》:本文主要介绍Maven配置中的<mirror>绕过HTTP阻断机制的方法,本文给大家分享问题原因及解决方案,感兴趣的朋友一... 目录一、问题场景:升级 Maven 后构建失败二、解决方案:通过 <mirror> 配置覆盖默认行为1. 配置示