小编Tom*_*len的帖子

无法实现Facebook'喜欢'按钮

这是我在我网站上的代码:

<iframe src="http://www.facebook.com/plugins/like.php?app_id=5766773068&amp;href&amp;send=false&amp;layout=standard&amp;width=47&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:47px; height:35px;" allowTransparency="true"></iframe>
Run Code Online (Sandbox Code Playgroud)

实现的示例URL是:

http://www.scirra.com/blog

每当我按下'喜欢'时,似乎什么都没发生,如果我扩大帧大小以查看发生了什么,它只是说'错误'.

我一直在尝试使用:

http://developers.facebook.com/docs/reference/plugins/like/

但它真的很有气质,有时甚至不给我代码.我必须指定URL吗?我认为不需要"喜欢"当前页面.

请注意我的主页上的like按钮工作正常,但指定了网址.那么有谁能看到我做错了什么?

html iframe facebook social-networking facebook-like

0
推荐指数
1
解决办法
784
查看次数

Jquery fancybox选项不起作用

这里有一些代码,盒子显示正常,但没有任何选项似乎会影响任何东西!

弹出式HTML:

<div id="fb-pop">
    <div id="fb-content">
        <div class="fb-txt">
            <strong>Have you considered buying a license for Construct 2?</strong><br /><br />
            It comes with more lots more features and possibilities.  Make better games!<br />
            <span class="ti">(And no more annoying messages!)</span>
        </div>
        <a class="get" href="REPLACEME" title="Your support is appreciated!"></a><br />
        <a class="no-thx" href="javascript:void(0)" onclick="$.fancybox.close()" title="Are you sure?  Upgrading your license helps support Construct 2's development!">No thanks, maybe next time!</a>
    </div>
</div>
<a href="#fb-content" id="autostart"></a> 
Run Code Online (Sandbox Code Playgroud)

页面底部的JS:

jQuery(document).ready(function () {

    $("a#autostart").fancybox({
        'transitionIn': 'elastic',
        'transitionOut': 'elastic', …
Run Code Online (Sandbox Code Playgroud)

javascript jquery fancybox

0
推荐指数
1
解决办法
814
查看次数

将查询字符串添加到HTML正文中的所有锚链接

在C#中给出一个包含HTML的字符串,什么是自动将查询字符串数据添加test=1到每个超链接末尾的最佳方法?它应该只修改href锚链接的属性内的url (例如,不为图像URL等).

一个例子是:

输入

<a href="http://www.test.com">Visit http://www.test.com</a> today
and see what <a href="http://www.test.com?p=1">deals</a> we have.
Run Code Online (Sandbox Code Playgroud)

产量

<a href="http://www.test.com?test=1">Visit http://www.test.com</a> today
and see what <a href="http://www.test.com?p=1&test=1">deals</a> we have.
Run Code Online (Sandbox Code Playgroud)

这似乎有点棘手,我不确定从哪里开始这个最好的地方.任何帮助赞赏!

html c# asp.net

0
推荐指数
1
解决办法
634
查看次数

当 T 是列表时 default(T) 为 null

给定以下函数:

public static T GetCachedBoxedValue<T>(string cacheKey, Func<T> getFromExternFunction, bool skipLocalCaches = false)
{
    var r = Manager.Get(
        cacheKey,
        () => new Tuple<T>(
            getFromExternFunction()
        ),
        skipLocalCaches
    );
    if (r == null || r.Item1 == null)
    {
        return default;
    }
    return r.Item1;
}
Run Code Online (Sandbox Code Playgroud)

当 T 为 aList<Guid>r值为 null 时,它返回 null。我将如何修改它以返回一个新的空列表?

c# generics

0
推荐指数
1
解决办法
57
查看次数