Hii,
In your line:
$(this).attr('data-url',value.url);
are you sure this refers to the right DOM object?
Try adding an id to the anchor:
<a id='face-url' data-url="htts://xyz@..." class="mybuttons" data-type="facebook">
Then in your code, set the data-url attribute this way:
$('#face-url').data('url', value.url);
Now that you have set the attribute value, you have to be sure that the facebook API reads this attribute only after you've changed it.
Hope this work!!
Thank You!!