I would like to share the link which is very simple and clear way of integrating the twitter and facebook in SharePoint.
Twitter Integration
Face Book Integration
Microsoft 365, SharePoint Online, Power BI, SharePoint On Premises, C#, .Net & Tips
<script type="text/javascript" language="javascript"> function FileFormatValidate() { var uploadControl = document.getElementById('<%=FileUpload1.ClientID%>').value; //Regular Expression for the fileupload control. var reg = /^(([a-zA-Z]:)|(file://%7b2%7d/w )/$?)(//(/w[/w].*)) (.doc|.docx|.DOC|.DOCX)$/; //Checking if the file is empty or not if (uploadControl.length > 0) { //Checks with the control value. if (reg.test(uploadControl)) { return true; } else { //If the condition not satisfied shows error message. alert("Only .doc, docx files are allowed!"); return false; } } else { //If the File is Empty or No File is selected to upload shows this error message. alert("Please select a file to Upload"); return false; } } //End of function FileFormatValidate. </script>
<p style="height: 28px; width: 216px"> <asp:Button ID="btn_Upload" runat="server" Height="25px" onclick="btn_Upload_Click" OnClientClick="return FileFormatValidate();" Text="Upload" Width="128px" /> </p>