Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Get followed sites
List the sites that have been followed by the specified in user.
import java.util.List; import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.sites.Site; public class Console { public static void main(String[] args) { try { GraphClient client = new GraphClient(); client.setClientId("63333333-209e-454e-b7bd-55a4d201270f"); client.setTenant("independentsoft.onmicrosoft.com"); client.setClientSecret("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); List
sites = client.getFollowedSites("info@independentsoft.onmicrosoft.com"); for (Site site : sites) { System.out.println("Id: " + site.getId()); System.out.println("DisplayName: " + site.getDisplayName()); System.out.println("WebUrl: " + site.getWebUrl()); System.out.println("---------------------------------------"); } } catch (GraphException e) { System.out.println(e.getCode()); System.out.println(e.getMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*